Skip to content

Commit 4a76d47

Browse files
authored
fix: prioritize SST's Pulumi over system-installed versions (#6316)
Prepend SST's bin directory to PATH when spawning Pulumi processes. This ensures SST uses its bundled Pulumi binaries instead of system-installed versions, fixing compatibility issues with Pulumi v3.214.0+ which removed the -root flag from pulumi-language-nodejs. Fixes deployment failures on GitHub Actions ubuntu-latest runners where a newer Pulumi is pre-installed.
1 parent 37973c2 commit 4a76d47

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/project/run.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,13 @@ func (p *Project) RunNext(ctx context.Context, input *StackInput) error {
249249
}
250250

251251
env := os.Environ()
252+
// Prepend SST's bin directory to PATH to ensure SST's Pulumi is used over system-installed versions
253+
for i, e := range env {
254+
if strings.HasPrefix(e, "PATH=") {
255+
env[i] = "PATH=" + global.BinPath() + string(os.PathListSeparator) + strings.TrimPrefix(e, "PATH=")
256+
break
257+
}
258+
}
252259
for key, value := range p.Env() {
253260
env = append(env, fmt.Sprintf("%v=%v", key, value))
254261
}

0 commit comments

Comments
 (0)