Fix: clean up code
This commit is contained in:
1 parent
e2ff7ecac6
commit
df1fb3f0ef
2 files changed
+8
-9
No files matched your search
@@ -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);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user