Resolve reviews

This commit is contained in:
divyansh42 2021-04-09 01:02:06 +05:30
parent 67f10fa66b
commit 14aeab7d17
3 changed files with 11 additions and 6 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -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) {