Script Compiler Pathing
This commit is contained in:
@@ -286,6 +286,10 @@ func compileReferencedScripts(p *project.Project) ([]erf.Resource, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
compilerEnv, err := resolveScriptCompilerEnvironment()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tmpDir, err := os.MkdirTemp("", "sow-script-compile-*")
|
||||
if err != nil {
|
||||
@@ -302,7 +306,7 @@ func compileReferencedScripts(p *project.Project) ([]erf.Resource, error) {
|
||||
}
|
||||
outputPath := filepath.Join(tmpDir, resref+".ncs")
|
||||
cmd := exec.Command(compiler, "--dirs", scriptsDir, "-o", outputPath, sourcePath)
|
||||
cmd.Env = os.Environ()
|
||||
cmd.Env = compilerEnv
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
message := strings.TrimSpace(string(output))
|
||||
|
||||
Reference in New Issue
Block a user