Skip to content

Commit 25d151d

Browse files
committed
merge issues fixed
1 parent 2d49c6e commit 25d151d

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/DfuCommandsUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public static void flashDfuBins(ILaunchConfiguration configuration, IProject pro
139139
idfEnvMap.put("PYTHONUNBUFFERED", "1"); //$NON-NLS-1$ //$NON-NLS-2$
140140

141141
// Update with the CDT build environment variables
142-
Map<String, String> environment = new HashMap<>(IDFUtil.getSystemEnv());
142+
Map<String, String> environment = new HashMap<>(System.getenv());
143143
environment.putAll(idfEnvMap);
144144

145145
Logger.log(environment.toString());

bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -861,43 +861,6 @@ public static String resolveEnvVariable(String path)
861861
return resolvedPath.toString();
862862

863863
}
864-
865-
public static Map<String, String> getSystemEnv()
866-
{
867-
Map<String, String> env = new HashMap<>(System.getenv());
868-
869-
String idfToolsPath = Platform.getPreferencesService().getString(IDFCorePlugin.PLUGIN_ID,
870-
IDFCorePreferenceConstants.IDF_TOOLS_PATH, IDFCorePreferenceConstants.IDF_TOOLS_PATH_DEFAULT, null);
871-
env.put(IDFCorePreferenceConstants.IDF_TOOLS_PATH, idfToolsPath);
872-
873-
// Merge Homebrew bin paths into PATH
874-
String existingPath = env.getOrDefault("PATH", ""); //$NON-NLS-1$ //$NON-NLS-2$
875-
StringBuilder newPath = new StringBuilder();
876-
877-
String[] brewPaths = { "/usr/local/bin", "/opt/homebrew/bin" }; //$NON-NLS-1$ //$NON-NLS-2$
878-
879-
for (String brewPath : brewPaths)
880-
{
881-
if (Files.exists(Paths.get(brewPath)) && !existingPath.contains(brewPath))
882-
{
883-
newPath.append(brewPath).append(":"); //$NON-NLS-1$
884-
}
885-
}
886-
887-
// Append the original PATH at the end
888-
newPath.append(existingPath);
889-
env.put("PATH", newPath.toString()); //$NON-NLS-1$
890-
891-
return env;
892-
}
893-
894-
public static String getIDFToolsPathFromPreferences()
895-
{
896-
String idfToolsPath = Platform.getPreferencesService().getString(IDFCorePlugin.PLUGIN_ID,
897-
IDFCorePreferenceConstants.IDF_TOOLS_PATH, IDFCorePreferenceConstants.IDF_TOOLS_PATH_DEFAULT, null);
898-
return idfToolsPath;
899-
}
900-
901864

902865
public static void closeWelcomePage(IWorkbenchWindow activeww)
903866
{

0 commit comments

Comments
 (0)