Skip to content

Commit

Permalink
fix: astro:env warning (#12286)
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-lefebvre authored Oct 23, 2024
1 parent 52d1b58 commit 9d6bcdb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-fireants-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a case where a warning for experimental `astro:env` support would be shown when using an adapter but not actually using `astro:env`
16 changes: 9 additions & 7 deletions packages/astro/src/integrations/features-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ export function validateSupportedFeatures(
}
}

validationResult.envGetSecret = validateSupportKind(
envGetSecret,
adapterName,
logger,
'astro:env getSecret',
() => config?.experimental?.env !== undefined,
);
if (config.experimental?.env) {
validationResult.envGetSecret = validateSupportKind(
envGetSecret,
adapterName,
logger,
'astro:env getSecret',
() => true,
);
}

return validationResult;
}
Expand Down

0 comments on commit 9d6bcdb

Please sign in to comment.