Skip to content

Commit 76fcbd7

Browse files
authored
IEP-878: Fixing the git warning (#733)
I have fixed the git warning issue and possibly this will also fix the git spawn error. Further also reverted to a deprecated method for support with older cdt for PersistentPreferences class
1 parent fb441d0 commit 76fcbd7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

bundles/com.espressif.idf.debug.gdbjtag.openocd/src/com/espressif/idf/debug/gdbjtag/openocd/ui/preferences/GlobalMcuPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected void createFieldEditors()
111111
public boolean performOk()
112112
{
113113
boolean result = super.performOk();
114-
Path updatedPath = Paths.get(fPersistentPreferences.getInstallFolder(StringUtil.EMPTY)).getParent();
114+
Path updatedPath = Paths.get(fPersistentPreferences.getInstallFolder()).getParent();
115115
if (updatedPath != null)
116116
{
117117
updatedPath = updatedPath.resolve("share").resolve("openocd").resolve("scripts"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/ListInstalledToolsHandler.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.eclipse.swt.widgets.Display;
1414

1515
import com.espressif.idf.core.IDFConstants;
16+
import com.espressif.idf.core.IDFEnvironmentVariables;
1617
import com.espressif.idf.core.logging.Logger;
1718
import com.espressif.idf.core.util.IDFUtil;
1819
import com.espressif.idf.core.util.StringUtil;
@@ -77,7 +78,11 @@ protected void execute()
7778
{
7879
List<String> arguments = new ArrayList<String>();
7980
arguments.add(IDFConstants.TOOLS_LIST_CMD);
80-
81+
if (StringUtil.isEmpty(gitExecutablePath))
82+
{
83+
gitExecutablePath = new IDFEnvironmentVariables().getEnvValue(IDFEnvironmentVariables.GIT_PATH);
84+
}
85+
8186
runCommand(arguments, console);
8287
}
8388

0 commit comments

Comments
 (0)