summaryrefslogtreecommitdiff
path: root/cli/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'cli/standalone')
-rw-r--r--cli/standalone/binary.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs
index ebcbf3ee6..3efd8ee14 100644
--- a/cli/standalone/binary.rs
+++ b/cli/standalone/binary.rs
@@ -659,9 +659,15 @@ impl<'a> DenoCompileBinaryWriter<'a> {
remote_modules_store.add_redirects(&graph.redirects);
let env_vars_from_env_file = match cli_options.env_file_name() {
- Some(env_filename) => {
- log::info!("{} Environment variables from the file \"{}\" were embedded in the generated executable file", crate::colors::yellow("Warning"), env_filename);
- get_file_env_vars(env_filename.to_string())?
+ Some(env_filenames) => {
+ let mut aggregated_env_vars = IndexMap::new();
+ for env_filename in env_filenames.iter().rev() {
+ log::info!("{} Environment variables from the file \"{}\" were embedded in the generated executable file", crate::colors::yellow("Warning"), env_filename);
+
+ let env_vars = get_file_env_vars(env_filename.to_string())?;
+ aggregated_env_vars.extend(env_vars);
+ }
+ aggregated_env_vars
}
None => Default::default(),
};