You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- silent install without prompt as it's expected when we install nvm-windows from a script
- silent uninstall
- fix a warning (Warning: Line 80, Column 10: [Hint] Variable 'Result' never used)
msg1 := MsgBox('Node '+NodeVersion+' is already installed. Do you want NVM to control this version?', mbConfirmation, MB_YESNO) = IDNO;
155
-
if msg1 thenbegin
156
-
msg2 := MsgBox('NVM cannot run in parallel with an existing Node.js installation. Node.js must be uninstalled before NVM can be installed, or you must allow NVM to control the existing installation. Do you want NVM to control node '+NodeVersion+'?', mbConfirmation, MB_YESNO) = IDYES;
157
-
if msg2 thenbegin
158
-
TakeControl(NodePath, NodeVersion);
159
-
end;
160
-
ifnot msg2 thenbegin
161
-
DeleteFile(TmpResultFile);
162
-
WizardForm.Close;
163
-
end;
164
-
end;
165
-
ifnot msg1 then
166
-
begin
150
+
msg1 := SuppressibleMsgBox('Node '+NodeVersion+' is already installed. Do you want NVM to control this version?', mbConfirmation, MB_YESNO, IDYES) = IDNO;
151
+
if msg1 thenbegin
152
+
msg2 := SuppressibleMsgBox('NVM cannot run in parallel with an existing Node.js installation. Node.js must be uninstalled before NVM can be installed, or you must allow NVM to control the existing installation. Do you want NVM to control node '+NodeVersion+'?', mbConfirmation, MB_YESNO, IDYES) = IDYES;
153
+
if msg2 thenbegin
167
154
TakeControl(NodePath, NodeVersion);
168
155
end;
156
+
ifnot msg2 thenbegin
157
+
DeleteFile(TmpResultFile);
158
+
WizardForm.Close;
159
+
end;
160
+
end;
161
+
ifnot msg1 then
162
+
begin
163
+
TakeControl(NodePath, NodeVersion);
169
164
end;
170
165
end;
171
166
@@ -177,18 +172,13 @@ begin
177
172
RemoveDir(SymlinkPage.Values[0]);
178
173
end;
179
174
ifnot dir1 thenbegin
180
-
if WizardSilent thenbegin
175
+
msg3 := SuppressibleMsgBox(SymlinkPage.Values[0]+' will be overwritten and all contents will be lost. Do you want to proceed?', mbConfirmation, MB_OKCANCEL, IDOK) = IDOK;
176
+
if msg3 thenbegin
181
177
RemoveDir(SymlinkPage.Values[0]);
182
-
end
183
-
elsebegin
184
-
msg3 := MsgBox(SymlinkPage.Values[0]+' will be overwritten and all contents will be lost. Do you want to proceed?', mbConfirmation, MB_OKCANCEL) = IDOK;
185
-
if msg3 thenbegin
186
-
RemoveDir(SymlinkPage.Values[0]);
187
-
end;
188
-
ifnot msg3 thenbegin
189
-
//RaiseException('The symlink cannot be created due to a conflict with the existing directory at '+SymlinkPage.Values[0]);
190
-
WizardForm.Close;
191
-
end;
178
+
end;
179
+
ifnot msg3 thenbegin
180
+
//RaiseException('The symlink cannot be created due to a conflict with the existing directory at '+SymlinkPage.Values[0]);
181
+
WizardForm.Close;
192
182
end;
193
183
end;
194
184
end;
@@ -209,9 +199,7 @@ var
209
199
path: string;
210
200
nvm_symlink: string;
211
201
begin
212
-
ifnot UninstallSilent thenbegin
213
-
MsgBox('Removing NVM for Windows will remove the nvm command and all versions of node.js, including global npm modules.', mbInformation, MB_OK);
214
-
end;
202
+
SuppressibleMsgBox('Removing NVM for Windows will remove the nvm command and all versions of node.js, including global npm modules.', mbInformation, MB_OK, IDOK);
0 commit comments