mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
bug fix
This commit is contained in:
@@ -31,17 +31,18 @@ namespace Squirrel.Locators
|
||||
public override string UpdateExePath => throw new NotSupportedException("TestSquirrelLocator does not support this operation.");
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SemanticVersion CurrentlyInstalledVersion => new SemanticVersion(0, 0, 0);
|
||||
public override SemanticVersion CurrentlyInstalledVersion { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string AppContentDir => AppContext.BaseDirectory;
|
||||
|
||||
/// <inheritdoc cref="TestSquirrelLocator" />
|
||||
public TestSquirrelLocator(string appId, string packagesDir, ILogger logger)
|
||||
public TestSquirrelLocator(string appId, string version, string packagesDir, ILogger logger)
|
||||
: base(logger)
|
||||
{
|
||||
AppId = appId;
|
||||
PackagesDir = packagesDir;
|
||||
CurrentlyInstalledVersion = SemanticVersion.Parse(version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Squirrel.Sources
|
||||
if (!BaseDirectory.Exists)
|
||||
throw new Exception($"The local update directory '{BaseDirectory.FullName}' does not exist.");
|
||||
|
||||
var releasesPath = Path.Combine(BaseDirectory.FullName, "RELEASES");
|
||||
var releasesPath = Path.Combine(BaseDirectory.FullName, GetReleasesFileName());
|
||||
Log.Info($"Reading RELEASES from '{releasesPath}'");
|
||||
var fi = new FileInfo(releasesPath);
|
||||
|
||||
|
||||
@@ -36,26 +36,26 @@ namespace Squirrel.Tests.TestHelpers
|
||||
return (osVersion < 601);
|
||||
}
|
||||
|
||||
public static void RunBlockAsSTA(Action block)
|
||||
{
|
||||
Exception ex = null;
|
||||
var t = new Thread(() => {
|
||||
try {
|
||||
block();
|
||||
} catch (Exception e) {
|
||||
ex = e;
|
||||
}
|
||||
});
|
||||
//public static void RunBlockAsSTA(Action block)
|
||||
//{
|
||||
// Exception ex = null;
|
||||
// var t = new Thread(() => {
|
||||
// try {
|
||||
// block();
|
||||
// } catch (Exception e) {
|
||||
// ex = e;
|
||||
// }
|
||||
// });
|
||||
|
||||
t.SetApartmentState(ApartmentState.STA);
|
||||
t.Start();
|
||||
t.Join();
|
||||
// t.SetApartmentState(ApartmentState.STA);
|
||||
// t.Start();
|
||||
// t.Join();
|
||||
|
||||
if (ex != null) {
|
||||
// NB: If we don't do this, the test silently passes
|
||||
throw new Exception("", ex);
|
||||
}
|
||||
}
|
||||
// if (ex != null) {
|
||||
// // NB: If we don't do this, the test silently passes
|
||||
// throw new Exception("", ex);
|
||||
// }
|
||||
//}
|
||||
|
||||
public static IDisposable WithFakeInstallDirectory(string packageFileName, out string path)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user