mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Fix update resolution in osx test
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using Velopack;
|
||||
|
||||
public static class PathHelper
|
||||
{
|
||||
@@ -28,6 +29,18 @@ public static class PathHelper
|
||||
public static string GetRustAsset(params string[] names)
|
||||
=> Path.Combine(new string[] { GetRustBuildOutputDir() }.Concat(names).ToArray());
|
||||
|
||||
public static string CopyUpdateTo(string dir)
|
||||
{
|
||||
var updateName = "update.exe";
|
||||
if (VelopackRuntimeInfo.IsOSX) {
|
||||
updateName = "update";
|
||||
}
|
||||
var path = GetRustAsset(updateName);
|
||||
var newPath = Path.Combine(dir, updateName);
|
||||
File.Copy(path, newPath);
|
||||
return newPath;
|
||||
}
|
||||
|
||||
public static string GetTestRoot()
|
||||
{
|
||||
// XXX: This is an evil hack, but it's okay for a unit test
|
||||
|
||||
Reference in New Issue
Block a user