File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -900,7 +900,13 @@ 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+ String keyPath = "PATH" ; //$NON-NLS-1$
904+ String existingPath = env .getOrDefault (keyPath , "" ); //$NON-NLS-1$
905+ if (existingPath .isEmpty ())
906+ {
907+ keyPath = "Path" ; //$NON-NLS-1$
908+ existingPath = env .getOrDefault (keyPath , "" ); //$NON-NLS-1$
909+ }
904910 StringBuilder newPath = new StringBuilder ();
905911
906912 String [] brewPaths = { "/usr/local/bin" , "/opt/homebrew/bin" }; //$NON-NLS-1$ //$NON-NLS-2$
@@ -915,7 +921,7 @@ public static Map<String, String> getSystemEnv()
915921
916922 // Append the original PATH at the end
917923 newPath .append (existingPath );
918- env .put ("PATH" , newPath .toString ()); //$NON-NLS-1$
924+ env .put (keyPath , newPath .toString ()); // $NON-NLS-1$
919925
920926 return env ;
921927 }
You can’t perform that action at this time.
0 commit comments