Skip to content

Commit 6e4bf95

Browse files
pavelfeldmanaslushnikov
authored andcommitted
fix(install): check macOS version to be 10.14 or higher (#671)
Fixes #669
1 parent e65cc77 commit 6e4bf95

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/server/webkit.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,11 @@ const mkdtempAsync = platform.promisify(fs.mkdtemp);
224224
const WEBKIT_PROFILE_PATH = path.join(os.tmpdir(), 'playwright_dev_profile-');
225225

226226
let cachedMacVersion: string | undefined = undefined;
227-
function getMacVersion() {
227+
228+
function getMacVersion(): string {
228229
if (!cachedMacVersion) {
229230
const [major, minor] = execSync('sw_vers -productVersion').toString('utf8').trim().split('.');
231+
assert(+major === 10 && +minor >= 14, 'Error: unsupported macOS version, macOS 10.14 and newer are supported');
230232
cachedMacVersion = major + '.' + minor;
231233
}
232234
return cachedMacVersion;

0 commit comments

Comments
 (0)