trim string

This commit is contained in:
Naveenraj M
2020-03-30 14:49:04 +05:30
parent 44a969a0b7
commit 12c4708eec
2 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,7 @@ function run() {
// If you want to upload yourself , need to write api call to upload as asset // If you want to upload yourself , need to write api call to upload as asset
//core.setOutput("rpmPath", rpmPath) //core.setOutput("rpmPath", rpmPath)
let myOutput = ''; 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) { if (err) {
//some err occurred //some err occurred
console.error(err); console.error(err);
@ -67,6 +67,7 @@ function run() {
console.log(`stderr: ${stderr}`); console.log(`stderr: ${stderr}`);
} }
}); });
myOutput = myOutput.trim();
// only contents of workspace can be changed by actions and used by subsequent actions // 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 // So copy all generated rpms into workspace , and publish output path relative to workspace
yield exec.exec(`mkdir -p rpmbuild/SRPMS`); yield exec.exec(`mkdir -p rpmbuild/SRPMS`);

View File

@ -63,7 +63,7 @@ async function run() {
//core.setOutput("rpmPath", rpmPath) //core.setOutput("rpmPath", rpmPath)
let myOutput = ''; 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) { if (err) {
//some err occurred //some err occurred
console.error(err) 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 // 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 // So copy all generated rpms into workspace , and publish output path relative to workspace