Skip to content

Commit 9179f25

Browse files
rmarinhoCopilot
andcommitted
Guard against setting empty XCODE_DEVELOPER_DIR_PATH env var
Only set the XCODE_DEVELOPER_DIR_PATH environment variable when DeveloperRoot is non-empty. Setting it to an empty string could confuse child processes that check for its presence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 30400f1 commit 9179f25

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Xamarin.MacDev/AppleSdkSettings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ public static void Init ()
194194
XcodePath = xcode;
195195
DeveloperRoot = devroot;
196196
DeveloperRootVersionPlist = vplist;
197-
Environment.SetEnvironmentVariable ("XCODE_DEVELOPER_DIR_PATH", DeveloperRoot);
197+
if (!string.IsNullOrEmpty (DeveloperRoot))
198+
Environment.SetEnvironmentVariable ("XCODE_DEVELOPER_DIR_PATH", DeveloperRoot);
198199
} else {
199200
SetInvalid ();
200201
return;

0 commit comments

Comments
 (0)