diff --git a/lib/main.js b/lib/main.js index 4ff0bf3..4211c7e 100644 --- a/lib/main.js +++ b/lib/main.js @@ -55,7 +55,7 @@ function run() { // If you want to upload yourself , need to write api call to upload as asset //core.setOutput("rpmPath", rpmPath) let myOutput = ''; - cp.exec('ls /github/home/rpmbuild/SRPMS/', (err, stdout, stderr) => { + yield cp.exec('ls /github/home/rpmbuild/SRPMS/', (err, stdout, stderr) => { if (err) { //some err occurred console.error(err); @@ -67,6 +67,7 @@ function run() { console.log(`stderr: ${stderr}`); } }); + myOutput = myOutput.trim(); // only contents of workspace can be changed by actions and used by subsequent actions // So copy all generated rpms into workspace , and publish output path relative to workspace yield exec.exec(`mkdir -p rpmbuild/SRPMS`); diff --git a/src/main.ts b/src/main.ts index deede10..90f2ee6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -63,7 +63,7 @@ async function run() { //core.setOutput("rpmPath", rpmPath) let myOutput = ''; - cp.exec('ls /github/home/rpmbuild/SRPMS/', (err, stdout, stderr) => { + await cp.exec('ls /github/home/rpmbuild/SRPMS/', (err, stdout, stderr) => { if (err) { //some err occurred console.error(err) @@ -75,6 +75,7 @@ async function run() { } }); + myOutput = myOutput.trim(); // only contents of workspace can be changed by actions and used by subsequent actions // So copy all generated rpms into workspace , and publish output path relative to workspace