Script Compiler Pathing

This commit is contained in:
2026-04-10 19:50:17 +02:00
parent 77c373c126
commit cecafa9c1f
3 changed files with 333 additions and 2 deletions
+5 -1
View File
@@ -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))