diff --git a/src/packager.ts b/src/packager.ts index 12be14050d9..73db795e82c 100644 --- a/src/packager.ts +++ b/src/packager.ts @@ -320,6 +320,11 @@ export async function checkWineVersion(checkPromise: Promise) { wineVersion = wineVersion.substring(0, spaceIndex) } + const suffixIndex = wineVersion.indexOf("-") + if (suffixIndex > 0) { + wineVersion = wineVersion.substring(0, suffixIndex) + } + if (wineVersion.split(".").length === 2) { wineVersion += ".0" } diff --git a/test/src/BuildTest.ts b/test/src/BuildTest.ts index 77c0d98aed7..ef69abe0c11 100644 --- a/test/src/BuildTest.ts +++ b/test/src/BuildTest.ts @@ -213,10 +213,11 @@ test.ifDevOrLinuxCi("smart unpack", () => { test("wine version", async () => { await checkWineVersion(BluebirdPromise.resolve("1.9.23 (Staging)")) + await checkWineVersion(BluebirdPromise.resolve("2.0-rc2")) }) function currentPlatform(): PackagerOptions { return { targets: Platform.fromString(process.platform).createTarget(DIR_TARGET), } -} \ No newline at end of file +}