mirror of
https://github.com/engineer-man/piston.git
synced 2025-05-03 02:16:26 +02:00
Explicitly provide env vars instead of inheriting them from parent (#703)
This commit is contained in:
parent
6ef0cdf7b4
commit
1d55a41a2d
2 changed files with 4 additions and 14 deletions
|
@ -178,15 +178,7 @@ class Runtime {
|
|||
const env_file = path.join(this.pkgdir, '.env');
|
||||
const env_content = fss.read_file_sync(env_file).toString();
|
||||
|
||||
this._env_vars = {};
|
||||
|
||||
env_content
|
||||
.trim()
|
||||
.split('\n')
|
||||
.map(line => line.split('=', 2))
|
||||
.forEach(([key, val]) => {
|
||||
this._env_vars[key.trim()] = val.trim();
|
||||
});
|
||||
this._env_vars = env_content.trim().split('\n');
|
||||
}
|
||||
|
||||
return this._env_vars;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue