Correctly set NODE_PATH when starting OutOfProcessNodeInstance

This commit is contained in:
SteveSandersonMS
2016-06-14 10:43:03 +01:00
parent 3fc19ea77b
commit a881ca5b96

View File

@@ -91,9 +91,9 @@ namespace Microsoft.AspNetCore.NodeServices
var nodePathValue = existingNodePath + Path.Combine(_projectPath, "node_modules"); var nodePathValue = existingNodePath + Path.Combine(_projectPath, "node_modules");
#if NET451 #if NET451
startInfo.EnvironmentVariables.Add("NODE_PATH", nodePathValue); startInfo.EnvironmentVariables["NODE_PATH"] = nodePathValue;
#else #else
startInfo.Environment.Add("NODE_PATH", nodePathValue); startInfo.Environment["NODE_PATH"] = nodePathValue;
#endif #endif
_nodeProcess = Process.Start(startInfo); _nodeProcess = Process.Start(startInfo);