diff --git a/Launch-Scripts/create-shortcut.js b/Launch-Scripts/create-shortcut.js index 97f443bae..09ec86e99 100644 --- a/Launch-Scripts/create-shortcut.js +++ b/Launch-Scripts/create-shortcut.js @@ -19,16 +19,15 @@ if (os.platform() == "win32") { ] // Place Shortcuts using powershell - let dir; - for (dir in shortcutPaths) { - let command = `$ws = New-Object -ComObject WScript.Shell; $s = $ws.CreateShortcut("${shortcutPaths[dir]}"); $S.TargetPath = "${target}"; $S.IconLocation = "${icon}"; $S.Save()`; + for (let dir of shortcutPaths) { + let command = `$ws = New-Object -ComObject WScript.Shell; $s = $ws.CreateShortcut("${dir}"); $S.TargetPath = "${target}"; $S.IconLocation = "${icon}"; $S.Save()`; exec( command, { shell: "powershell.exe", execArgv: "-ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command" }, - function ( error, stdout ){ + function ( error, stdout){ if (error) { console.log(''); console.log("There was an error installing a shortcut: "); @@ -38,6 +37,8 @@ if (os.platform() == "win32") { } else { console.log(''); console.log("Shortcut added successfully!"); + console.log(''); + console.log(stdout); } }); }; diff --git a/setup.js b/setup.js index 2f7860277..14cdf84e3 100644 --- a/setup.js +++ b/setup.js @@ -37,14 +37,12 @@ console.log(''); console.log(nodeModulesDirs); console.log(''); - -let dir; -for (dir in nodeModulesDirs) { +for (let dir of nodeModulesDirs) { // Loop through directories and run npm ci in a child process shell. - let command = "echo Results of install at "+ nodeModulesDirs[dir] + " & npm ci"; + let command = "echo Results of install at "+ dir + " & npm ci"; exec( command, { - cwd: nodeModulesDirs[dir] + cwd: dir }, function ( error, stdout ){ if (error) {