Skip to content

Commit

Permalink
Try getting env variable from process before searching for files
Browse files Browse the repository at this point in the history
  • Loading branch information
mellson committed Nov 14, 2023
1 parent c54008b commit 39bd985
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/machine-extractor/src/sky/skyConfigExtractResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export function skyConfigExtractResult({
return fileContent.substring(node.start!, node.end!);
},
getEnvVariable: (name: string): string | undefined => {
if (process.env[name]) {
return process.env[name];
}
const envFileContents = getClosestEnvFile({ filePath, cwd });
return getEnvValue(envFileContents, name);
},
Expand Down

0 comments on commit 39bd985

Please sign in to comment.