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
Copy file name to clipboardExpand all lines: plugins/updater/src/updater.rs
+97-11Lines changed: 97 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -683,17 +683,25 @@ impl Update {
683
683
let install_mode = self.config.install_mode();
684
684
let current_args = &self.current_exe_args()[1..];
685
685
let msi_args;
686
+
let nsis_args;
686
687
687
688
let installer_args:Vec<&OsStr> = match&updater_type {
688
-
WindowsUpdaterType::Nsis{ .. } => install_mode
689
-
.nsis_args()
690
-
.iter()
691
-
.map(OsStr::new)
692
-
.chain(once(OsStr::new("/UPDATE")))
693
-
.chain(once(OsStr::new("/ARGS")))
694
-
.chain(current_args.to_vec())
695
-
.chain(self.installer_args())
696
-
.collect(),
689
+
WindowsUpdaterType::Nsis{ .. } => {
690
+
nsis_args = current_args
691
+
.iter()
692
+
.map(escape_nsis_current_exe_arg)
693
+
.collect::<Vec<_>>();
694
+
695
+
install_mode
696
+
.nsis_args()
697
+
.iter()
698
+
.map(OsStr::new)
699
+
.chain(once(OsStr::new("/UPDATE")))
700
+
.chain(once(OsStr::new("/ARGS")))
701
+
.chain(nsis_args.iter().map(OsStr::new))
702
+
.chain(self.installer_args())
703
+
.collect()
704
+
}
697
705
WindowsUpdaterType::Msi{ path, .. } => {
698
706
let escaped_args = current_args
699
707
.iter()
@@ -1363,6 +1371,41 @@ impl PathExt for PathBuf {
1363
1371
}
1364
1372
}
1365
1373
1374
+
// adapted from https://github.com/rust-lang/rust/blob/1c047506f94cd2d05228eb992b0a6bbed1942349/library/std/src/sys/args/windows.rs#L174
0 commit comments