forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(compile): support --env (denoland#24166)
Supported the use of --env flag with the compile subcommand, so that the generated executable/binary file can access the passed env file.
- Loading branch information
1 parent
5294687
commit fb63485
Showing
8 changed files
with
88 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"tempDir": true, | ||
"steps": [ | ||
{ | ||
"args": "compile -A --output out --env=environment.env main.ts", | ||
"output": "compile.out" | ||
}, | ||
{ | ||
"commandName": "./out", | ||
"args": [], | ||
"output": "main.out" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Warning Parsing failed within the specified environment file: environment.env at index: 3 of the value: c:\path | ||
Check [WILDCARD]main.ts | ||
Compile [WILDCARD]main.ts to out[WILDCARD] | ||
Warning Environment variables from the file "environment.env" were embedded in the generated executable file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FOO=valid | ||
MULTILINE="First Line | ||
Second Line" | ||
ANOTHER_FOO=c:\path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
valid | ||
undefined | ||
First Line | ||
Second Line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
console.log(Deno.env.get("FOO")); | ||
console.log(Deno.env.get("ANOTHER_FOO")); | ||
console.log(Deno.env.get("MULTILINE")); |