mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
bug fix
This commit is contained in:
@@ -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