We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aef82b4 commit b64ba41Copy full SHA for b64ba41
1 file changed
pkg/cmd/open/open.go
@@ -1062,6 +1062,13 @@ func ensureCodexInstalled(t *terminal.Terminal, sshAlias string) error {
1062
return nil // already installed
1063
}
1064
1065
+ // Verify npm is available on remote before attempting install
1066
+ npmCheck := fmt.Sprintf("ssh %s 'which npm >/dev/null 2>&1'", sshAlias)
1067
+ npmExec := exec.Command("bash", "-c", npmCheck) // #nosec G204
1068
+ if npmErr := npmExec.Run(); npmErr != nil {
1069
+ return fmt.Errorf("failed to install Codex: npm is not installed on the remote instance. Please install Node.js/npm first")
1070
+ }
1071
+
1072
t.Vprintf("Installing Codex CLI on remote instance...\n")
1073
1074
installCmd := fmt.Sprintf("ssh %s 'npm install -g @openai/codex 2>/dev/null || sudo npm install -g @openai/codex'", sshAlias)
0 commit comments