Skip to content
This repository was archived by the owner on Feb 11, 2020. It is now read-only.

Commit e19a818

Browse files
author
Dr. Safi
committed
Update shellscript implementation with option for shell file execution.
1 parent 1916367 commit e19a818

File tree

1 file changed

+11
-0
lines changed
  • module/reusableNestedUnit/implementation/shellscript

1 file changed

+11
-0
lines changed

module/reusableNestedUnit/implementation/shellscript/Unit.class.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ ${this.command} ${this.argument}`;
4444
process.exit(childProcess.status)
4545
}
4646
break;
47+
case 'file':
48+
try {
49+
console.log(message)
50+
let appBasePath = '/project/application/source/containerInstallationNodejs/shellScript/'
51+
this.option.cwd = appBasePath
52+
childProcess = spawn('sh', this.filename, this.option)
53+
if(childProcess.status > 0) throw childProcess.error
54+
} catch (error) {
55+
process.exit(childProcess.status)
56+
}
57+
break;
4758
default:
4859
console.log('shellscriptUnit.implementation does not match any option.')
4960
break;

0 commit comments

Comments
 (0)