@wavemaker/angular-codegen 11.7.0-next.42251 → 11.7.0-rc.5525

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,7 @@ const downloadNPMPackage = (packageInfo) => {
32
32
  const HOME_DIR = os.homedir();
33
33
  const PATH_NPM_PACKAGE = (packageInfo.baseDir || HOME_DIR + '/.wm/node_modules/') + packageInfo.name + '/' + packageInfo.version;
34
34
  const PATH_NPM_PACKAGE_SUCCESS = PATH_NPM_PACKAGE + '/.SUCCESS';
35
+ let isError = false;
35
36
 
36
37
  // To check global app runtime node modules.
37
38
  if (!isNPMPackageExist(PATH_NPM_PACKAGE_SUCCESS, packageInfo.successMsg)) {
@@ -44,10 +45,16 @@ const downloadNPMPackage = (packageInfo) => {
44
45
  }
45
46
 
46
47
  executeSyncCmd('cd ' + PATH_NPM_PACKAGE + ' && ' + npmInstallCMD, (errMsg) => {
48
+ isError = true;
47
49
  console.log(packageInfo.infoMsg + ' Something wrong with npm installation ', errMsg);
48
50
  }, packageInfo.infoMsg);
49
51
 
50
- fs.writeFileSync(PATH_NPM_PACKAGE_SUCCESS, packageInfo.successMsg);
52
+ //only create a .SUCCESS file when there is no error
53
+ if(!isError) {
54
+ isError = false;
55
+ fs.writeFileSync(PATH_NPM_PACKAGE_SUCCESS, packageInfo.successMsg);
56
+ }
57
+
51
58
  } else {
52
59
  console.log(packageInfo.infoMsg + ' Node packages already installed!');
53
60
  }