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

Commit 25f410e

Browse files
author
Dr. Safi
committed
Update nestedUnit shellscript implementation fully working with async.
1 parent 32a8625 commit 25f410e

File tree

1 file changed

+7
-3
lines changed
  • module/reusableNestedUnit/implementation/shellscript

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,21 @@ export default ({ Superclass }) => {
1818
@extendedSubclassPattern.Subclass()
1919
class Unit extends Superclass {
2020
async executeScript() {
21-
switch (this.implementation) {
22-
case 'spawn':
23-
let message = ` _____ _
21+
let message = ` _____ _
2422
| ____|__ __ ___ ___ _ _ | |_ ___
2523
| _| \\ \\/ // _ \\ / __|| | | || __|/ _ \\
2624
| |___ > <| __/| (__ | |_| || |_| __/
2725
|_____|/_/\\_\\\\___| \\___| \\__,_| \\__|\\___|
2826
${this.command} ${this.argument}`;
27+
switch (this.implementation) {
28+
case 'spawn':
2929
console.log(message)
3030
spawnSync(this.command, this.argument, this.option)
3131
break;
32+
case 'spawnAsynchronous':
33+
console.log(message)
34+
spawn(this.command, this.argument, this.option)
35+
break;
3236
default:
3337
console.log('shellscriptUnit.implementation does not match any option.')
3438
break;

0 commit comments

Comments
 (0)