mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Properly set working directory when running post install hooks
This commit is contained in:
@@ -408,7 +408,7 @@ namespace Squirrel
|
||||
cts.CancelAfter(15 * 1000);
|
||||
|
||||
try {
|
||||
await Utility.InvokeProcessAsync(exe, args, cts.Token).ConfigureAwait(false);
|
||||
await Utility.InvokeProcessAsync(exe, args, cts.Token, Path.GetDirectoryName(exe)).ConfigureAwait(false);
|
||||
} catch (Exception ex) {
|
||||
this.Log().ErrorException("Couldn't run Squirrel hook, continuing: " + exe, ex);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,8 @@ namespace Squirrel.Tests
|
||||
Assert.True(File.Exists(Path.Combine(tempDir, "theApp", "app-0.2.0", "args.txt")));
|
||||
|
||||
var text = File.ReadAllText(Path.Combine(tempDir, "theApp", "app-0.2.0", "args.txt"), Encoding.UTF8);
|
||||
Assert.Contains("updated|0.2.0", text);
|
||||
Assert.Contains("updated", text);
|
||||
Assert.Contains("0.2.0", text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
test/fixtures/PublishSingleFileAwareApp.exe
vendored
BIN
test/fixtures/PublishSingleFileAwareApp.exe
vendored
Binary file not shown.
Reference in New Issue
Block a user