MCPcopy
hub / github.com/desktop/desktop / validateMacOSVersion

Function validateMacOSVersion

script/validate-macos-version.ts:48–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46const expectedVersion = ValidMacOSVersions[channel]
47
48function validateMacOSVersion() {
49 try {
50 const actualVersion = resolveVersionInInfoPlist()
51
52 if (actualVersion !== expectedVersion) {
53 handleError(
54 `The minimum macOS version for the ${channel} channel is incorrect. Expected ${expectedVersion} but found ${actualVersion}.`
55 )
56 }
57
58 console.log(
59 `The minimum macOS version for the ${channel} channel is correct: ${actualVersion}.`
60 )
61 } catch (error) {
62 handleError(
63 `Failed to validate macOS version: ${
64 error instanceof Error ? error.message : String(error)
65 }`
66 )
67 }
68}
69
70function isChannelToValidate(channel: string): channel is ChannelToValidate {
71 return Object.keys(ValidMacOSVersions).includes(channel)

Callers 1

Calls 3

handleErrorFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected