File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -900,7 +900,9 @@ public static Map<String, String> getSystemEnv()
900900 env .put (IDFCorePreferenceConstants .IDF_TOOLS_PATH , idfToolsPath );
901901
902902 // Merge Homebrew bin paths into PATH
903- String existingPath = env .getOrDefault ("PATH" , "" ); //$NON-NLS-1$ //$NON-NLS-2$
903+ // Windows may use "Path" while Unix uses "PATH"
904+ String keyPath = env .containsKey ("PATH" ) ? "PATH" : "Path" ; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
905+ String existingPath = env .getOrDefault (keyPath , "" ); //$NON-NLS-1$
904906 StringBuilder newPath = new StringBuilder ();
905907
906908 String [] brewPaths = { "/usr/local/bin" , "/opt/homebrew/bin" }; //$NON-NLS-1$ //$NON-NLS-2$
@@ -915,7 +917,7 @@ public static Map<String, String> getSystemEnv()
915917
916918 // Append the original PATH at the end
917919 newPath .append (existingPath );
918- env .put ("PATH" , newPath .toString ()); //$NON-NLS-1$
920+ env .put (keyPath , newPath .toString ()); // $NON-NLS-1$
919921
920922 return env ;
921923 }
You can’t perform that action at this time.
0 commit comments