Skip to content

Commit

Permalink
PATH env must store the directory of the node and not the node exe). See
Browse files Browse the repository at this point in the history
  • Loading branch information
angelozerr committed Jul 7, 2017
1 parent 6455f42 commit 99f97ab
Showing 1 changed file with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*******************************************************************************/
package ts.eclipse.ide.angular2.internal.cli.wizards;

import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
Expand Down Expand Up @@ -46,7 +45,6 @@
import ts.eclipse.ide.terminal.interpreter.LineCommand;
import ts.eclipse.ide.ui.wizards.AbstractNewProjectWizard;
import ts.eclipse.ide.ui.wizards.AbstractWizardNewTypeScriptProjectCreationPage;
import ts.utils.FileUtils;
import ts.utils.StringUtils;

/**
Expand Down Expand Up @@ -112,10 +110,9 @@ public void addPages() {

// only add page if there are already projects in the workspace
/*
* if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length >
* 0) { referencePage = new
* WizardNewProjectReferencePage("basicReferenceProjectPage");//$NON-NLS
* -1$
* if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length > 0) {
* referencePage = new
* WizardNewProjectReferencePage("basicReferenceProjectPage");//$NON-NLS -1$
* referencePage.setTitle(ResourceMessages.NewProject_referenceTitle);
* referencePage.setDescription(ResourceMessages.
* NewProject_referenceDescription); this.addPage(referencePage); }
Expand Down Expand Up @@ -167,7 +164,7 @@ public void run(final IProgressMonitor monitor) throws InvocationTargetException

if (!commands.isEmpty()) {
// Prepare terminal properties
properties.put(ITerminalsConnectorConstants.PROP_PROCESS_WORKING_DIR, projectLocation.toString());
properties.put(ITerminalsConnectorConstants.PROP_PROCESS_WORKING_DIR, projectLocation.toString());
if (!StringUtils.isEmpty(nodeFilePath)) {
EnvPath.insertToEnvPath(properties, nodeFilePath);
}
Expand All @@ -180,11 +177,6 @@ public void run(final IProgressMonitor monitor) throws InvocationTargetException
e.printStackTrace();
}
}

private String getNodeFilePath() {
File nodeFile = TypeScriptResourceUtil.getWorkspaceNodejsInstallPath();
return nodeFile != null ? FileUtils.getPath(nodeFile) : null;
}
};
}
}

0 comments on commit 99f97ab

Please sign in to comment.