diff --git a/dist/setup.sh b/dist/setup.sh index 9db9eea..722cb69 100755 --- a/dist/setup.sh +++ b/dist/setup.sh @@ -167,6 +167,14 @@ configure() { -e DEFAULT_USER=$USER \ --log-driver=none$pw_env \ --rm$interactive cyphernodeconf:latest $(id -u):$(id -g) yo --no-insight cyphernode$gen_options $recreate + if [[ -f exitStatus.sh ]]; then + . ./exitStatus.sh + rm ./exitStatus.sh + fi + + if [[ ! $EXIT_STATUS == 0 ]]; then + exit 1 + fi } copy_file() { diff --git a/install/generator-cyphernode/generators/app/index.js b/install/generator-cyphernode/generators/app/index.js index 6538c2c..b45b53c 100644 --- a/install/generator-cyphernode/generators/app/index.js +++ b/install/generator-cyphernode/generators/app/index.js @@ -104,6 +104,10 @@ module.exports = class extends Generator { this.featureChoices = featureChoices; + if( fs.existsSync(path.join('/data', 'exitStatus.sh')) ) { + fs.unlinkSync(path.join('/data', 'exitStatus.sh')); + } + } async _initConfig() { @@ -311,6 +315,9 @@ module.exports = class extends Generator { } } + fs.writeFileSync(path.join('/data', 'exitStatus.sh'), 'EXIT_STATUS=0'); + + } install() {