mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
fix: correct PATH environment variable configuration in task runner
- Updated the configureNodePath method to properly set the PATH environment variable by concatenating node_bin and node_modules paths, ensuring the correct environment setup for Node.js development.
This commit is contained in:
@@ -361,15 +361,17 @@ func (r *Runner) configureNodePath() {
|
||||
// Configure global node_modules path
|
||||
nodePath := utils.GetNodeModulesPath()
|
||||
if !strings.Contains(envPath, nodePath) {
|
||||
_ = os.Setenv("PATH", nodePath+":"+envPath)
|
||||
envPath = nodePath + ":" + envPath
|
||||
}
|
||||
_ = os.Setenv("NODE_PATH", nodePath)
|
||||
|
||||
// Configure global node_bin path
|
||||
nodeBinPath := utils.GetNodeBinPath()
|
||||
if !strings.Contains(envPath, nodeBinPath) {
|
||||
_ = os.Setenv("PATH", nodeBinPath+":"+envPath)
|
||||
envPath = nodeBinPath + ":" + envPath
|
||||
}
|
||||
|
||||
_ = os.Setenv("PATH", envPath)
|
||||
}
|
||||
|
||||
func (r *Runner) configureGoPath() {
|
||||
|
||||
Reference in New Issue
Block a user