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: asyncgit/src/sync/hooks.rs
+6-10Lines changed: 6 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,7 @@ fn run_hook(
105
105
let output = Command::new("bash")
106
106
.args(bash_args)
107
107
.current_dir(path)
108
+
.env("DUMMYENV","FixPathHandlingOnWindows")// This call forces Command to handle the Path environment correctly on windows, the specific env set here does not matter
108
109
.output();
109
110
110
111
let output = output.expect("general hook error");
@@ -183,8 +184,7 @@ mod tests {
183
184
let root = repo.path().parent().unwrap();
184
185
let repo_path = root.as_os_str().to_str().unwrap();
185
186
186
-
let hook = b"
187
-
#!/bin/sh
187
+
let hook = b"#!/bin/sh
188
188
exit 0
189
189
";
190
190
@@ -204,8 +204,7 @@ exit 0
204
204
let root = repo.path().parent().unwrap();
205
205
let repo_path = root.as_os_str().to_str().unwrap();
206
206
207
-
let hook = b"
208
-
#!/bin/sh
207
+
let hook = b"#!/bin/sh
209
208
echo 'msg' > $1
210
209
echo 'rejected'
211
210
exit 1
@@ -230,8 +229,7 @@ exit 1
230
229
let root = repo.path().parent().unwrap();
231
230
// let repo_path = root.as_os_str().to_str().unwrap();
232
231
233
-
let hook = b"
234
-
#!/bin/sh
232
+
let hook = b"#!/bin/sh
235
233
echo 'msg' > $1
236
234
echo 'rejected'
237
235
exit 1
@@ -261,8 +259,7 @@ exit 1
261
259
let root = repo.path().parent().unwrap();
262
260
let repo_path = root.as_os_str().to_str().unwrap();
0 commit comments