mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-04-20 09:01:23 +00:00
Resolve reviews
This commit is contained in:
parent
67f10fa66b
commit
14aeab7d17
3 changed files with 11 additions and 6 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -173,14 +173,19 @@ export class BuildahCli implements Buildah {
|
||||||
};
|
};
|
||||||
|
|
||||||
// To solve https://github.com/redhat-actions/buildah-build/issues/45
|
// To solve https://github.com/redhat-actions/buildah-build/issues/45
|
||||||
|
const execEnv: { [key: string] : string } = {};
|
||||||
|
Object.entries(process.env).forEach(([ key, value ]) => {
|
||||||
|
if (value != null) {
|
||||||
|
execEnv[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (this.storageOptsEnv) {
|
if (this.storageOptsEnv) {
|
||||||
finalExecOptions.env = {
|
execEnv.STORAGE_OPTS = this.storageOptsEnv;
|
||||||
...process.env,
|
|
||||||
STORAGE_OPTS: this.storageOptsEnv,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
finalExecOptions.env = execEnv;
|
||||||
|
|
||||||
const exitCode = await exec.exec(this.executable, args, finalExecOptions);
|
const exitCode = await exec.exec(this.executable, args, finalExecOptions);
|
||||||
|
|
||||||
if (execOptions.ignoreReturnCode !== true && exitCode !== 0) {
|
if (execOptions.ignoreReturnCode !== true && exitCode !== 0) {
|
||||||
|
|
Loading…
Reference in a new issue