helpful-psychiatrist-67296
06/05/2024, 11:45 AMconst setupScript2 = `
#!/bin/bash
non_existent_command
`;
let createFolderAndFile = new command.remote.Command("createFolderAndFile", {
connection: {
host: "XX.XX.XX.XX",
user: "root",
password: "XXXXXXXXX", // Replace with your actual password
},
create: setupScript2,
});
createFolderAndFile.stdout.apply((output) => {
console.log("Output:", output);
});
createFolderAndFile.stderr.apply((error) => {
if (error) {
console.log("Error:", error);
}
});
export const error = createFolderAndFile.stderr;
export const output = createFolderAndFile.stdout;
My terminal after I run pulumi up
pulumi up
Previewing update (dev)
View in Browser (Ctrl+O): <https://app.pulumi.com/|https://app.pulumi.com/>..........................................
Type Name Plan
+ pulumi:pulumi:Stack create_folder_files-dev create
+ └─ command:remote:Command createFolderAndFile create
Outputs:
error : output<string>
output: output<string>
Resources:
+ 2 to create
Do you want to perform this update? yes
Updating (dev)
View in Browser (Ctrl+O): <https://app.pulumi.com/|https://app.pulumi.com/>............................................
Type Name Status Info
+ pulumi:pulumi:Stack create_folder_files-dev **creating failed** 1 error
+ └─ command:remote:Command createFolderAndFile **creating failed** 1 error
Diagnostics:
pulumi:pulumi:Stack (create_folder_files-dev):
error: update failed
command:remote:Command (createFolderAndFile):
error: Process exited with status 127: running "\n#!/bin/bash\n\nnon_existent_command\n":
bash: line 3: non_existent_command: command not found
Resources:
+ 1 created
Duration: 8s
fast-sandwich-30809
06/05/2024, 3:19 PMcommand:remote:Command (createFolderAndFile):
error: Process exited with status 127: running "\n#!/bin/bash\n\nnon_existent_command\n":
bash: line 3: non_existent_command: command not found
helpful-psychiatrist-67296
06/05/2024, 4:35 PMfast-sandwich-30809
06/05/2024, 7:56 PM.apply
on the stderr string. In a sense, pulumi doesn't want to run Command.stderr.apply
because it considers the command to have failed - I'm not sure how to fix this