diff --git a/Extension/package.json b/Extension/package.json index 2c03358a5..fabfceae4 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -6876,7 +6876,7 @@ "node-stream-zip": "^1.15.0", "node-vcvarsall": "^1.2.0", "node-vswhere": "^1.0.2", - "plist": "^3.1.0", + "plist": "^3.1.1", "posix-getopt": "^1.2.1", "shell-quote": "1.8.2", "ssh-config": "^4.4.4", diff --git a/Extension/src/platform.ts b/Extension/src/platform.ts index 09ddce3e9..dd43b4c2e 100644 --- a/Extension/src/platform.ts +++ b/Extension/src/platform.ts @@ -71,11 +71,15 @@ export class PlatformInformation { if (util.checkFileExistsSync(DARWIN_SYSTEM_VERSION_PLIST)) { const systemVersionPListBuffer: Buffer = fs.readFileSync(DARWIN_SYSTEM_VERSION_PLIST); - const systemVersionData: any = plist.parse(systemVersionPListBuffer.toString()); - if (systemVersionData) { - productDarwinVersion = systemVersionData.ProductVersion; - } else { - errorMessage = localize("missing.plist.productversion", "Could not get ProduceVersion from SystemVersion.plist"); + try { + const systemVersionData: any = plist.parse(systemVersionPListBuffer.toString()); + if (systemVersionData) { + productDarwinVersion = systemVersionData.ProductVersion; + } else { + errorMessage = localize("missing.plist.productversion", "Could not get ProduceVersion from SystemVersion.plist"); + } + } catch (error) { + errorMessage = localize("plist.parse.error", "Failed to parse SystemVersion.plist: {0}", (error as Error).message); } } else { errorMessage = localize("missing.darwin.systemversion.file", "Failed to find SystemVersion.plist in {0}.", DARWIN_SYSTEM_VERSION_PLIST); diff --git a/Extension/yarn.lock b/Extension/yarn.lock index b21e5fa46..1af4a07cc 100644 --- a/Extension/yarn.lock +++ b/Extension/yarn.lock @@ -1309,10 +1309,10 @@ resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" integrity sha1-Ml20I5XNSf5sFAV/mpAOQn34gQ4= -"@xmldom/xmldom@^0.8.8": - version "0.8.13" - resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@xmldom/xmldom/-/xmldom-0.8.13.tgz#00d1dd940b218dff2e49309d410d8bb212159225" - integrity sha1-ANHdlAshjf8uSTCdQQ2LshIVkiU= +"@xmldom/xmldom@^0.9.10": + version "0.9.10" + resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@xmldom/xmldom/-/xmldom-0.9.10.tgz#a0ad5a26fe8aa996310870726e1704977f769dee" + integrity sha1-oK1aJv6KqZYxCHBybhcEl392ne4= "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -4990,12 +4990,12 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -plist@^3.1.0: - version "3.1.0" - resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/plist/-/plist-3.1.0.tgz#797a516a93e62f5bde55e0b9cc9c967f860893c9" - integrity sha1-eXpRapPmL1veVeC5zJyWf4YIk8k= +plist@^3.1.1: + version "3.1.1" + resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/plist/-/plist-3.1.1.tgz#fa6099e1e3cf6ea180258ebe6378ea3878c2c841" + integrity sha1-+mCZ4ePPbqGAJY6+Y3jqOHjCyEE= dependencies: - "@xmldom/xmldom" "^0.8.8" + "@xmldom/xmldom" "^0.9.10" base64-js "^1.5.1" xmlbuilder "^15.1.1"