File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
crates/tauri-bundler/src/bundle/windows Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " tauri-bundler " : patch:bug
3
+ ---
4
+
5
+ Fix custom Windows sign command failing to sign app uninstaller if it references relative paths.
Original file line number Diff line number Diff line change @@ -142,12 +142,21 @@ pub fn sign_command_custom<P: AsRef<Path>>(
142
142
) -> crate :: Result < Command > {
143
143
let path = path. as_ref ( ) ;
144
144
145
+ let cwd = std:: env:: current_dir ( ) ?;
146
+
145
147
let mut cmd = Command :: new ( & command. cmd ) ;
146
148
for arg in & command. args {
147
149
if arg == "%1" {
148
150
cmd. arg ( path) ;
149
151
} else {
150
- cmd. arg ( arg) ;
152
+ let path = Path :: new ( arg) ;
153
+ // turn relative paths into absolute paths - so the uninstall command can use them
154
+ // since the !uninstfinalize NSIS hook runs in a different directory
155
+ if path. exists ( ) && path. is_relative ( ) {
156
+ cmd. arg ( cwd. join ( path) ) ;
157
+ } else {
158
+ cmd. arg ( arg) ;
159
+ }
151
160
}
152
161
}
153
162
Ok ( cmd)
You can’t perform that action at this time.
0 commit comments