diff --git a/lib/main.js b/lib/main.js index 8ee6565..12c3afa 100644 --- a/lib/main.js +++ b/lib/main.js @@ -29,7 +29,7 @@ function run() { // Copy spec file from path specFile to /root/rpmbuild/SPECS/ yield io.cp(`/github/workspace/${specFile}`, '/github/home/rpmbuild/SPECS/'); yield exec.exec(`cp -R /github/workspace/ /tmp/${repo}`); - yield exec.exec(`cd /tmp/ && tar -czvf ${repo}.tar.gz ${repo}`); + yield exec.exec(`tar -czvf ${repo}.tar.gz ${repo}`, { cwd: "/tmp" }); // Get repo files from /github/workspace/ yield exec.exec('ls -la /tmp'); yield exec.exec(`cp /tmp/${repo}.tar.gz /github/home/rpmbuild/SOURCES/`); diff --git a/src/main.ts b/src/main.ts index b0ead5f..1148c1e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,7 +27,7 @@ async function run() { await exec.exec(`cp -R /github/workspace/ /tmp/${repo}`); - await exec.exec(`cd /tmp/ && tar -czvf ${repo}.tar.gz ${repo}`); + await exec.exec(`tar -czvf ${repo}.tar.gz ${repo}`, { cwd : "/tmp"}); // Get repo files from /github/workspace/ await exec.exec('ls -la /tmp');