From 7c069cda92449cfe3782abf44db7404a7bb7e6b2 Mon Sep 17 00:00:00 2001 From: messense Date: Thu, 8 Dec 2022 15:52:13 +0800 Subject: [PATCH] Remove hardcoded `MACOSX_DEPLOYMENT_TARGET` --- dist/index.js | 11 +++++++---- src/index.ts | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8cc1f16..e7464d0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -11874,10 +11874,13 @@ async function innerMain() { await installRustTarget('x86_64-apple-darwin', rustToolchain); } await installRustTarget('aarch64-apple-darwin', rustToolchain); - env.DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer'; - env.SDKROOT = - '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'; - env.MACOSX_DEPLOYMENT_TARGET = '10.9'; + if (!env.DEVELOPER_DIR) { + env.DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer'; + } + if (!env.SDKROOT) { + env.SDKROOT = + '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'; + } core.endGroup(); } let fullCommand = `${maturinPath} ${args.join(' ')}`; diff --git a/src/index.ts b/src/index.ts index f8da6df..5c22b6e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -702,10 +702,13 @@ async function innerMain(): Promise { await installRustTarget('x86_64-apple-darwin', rustToolchain) } await installRustTarget('aarch64-apple-darwin', rustToolchain) - env.DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer' - env.SDKROOT = - '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' - env.MACOSX_DEPLOYMENT_TARGET = '10.9' + if (!env.DEVELOPER_DIR) { + env.DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer' + } + if (!env.SDKROOT) { + env.SDKROOT = + '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' + } core.endGroup() }