How to a bash file from pulumi ? tried below but d...
# typescript
r
How to a bash file from pulumi ? tried below but dint seem to work
Copy code
import { exec } from "child_process";
exec("./removeBuild.sh ", (err: any, stdout: any, stderr: any) => {
  if (err) {
    //some err occurred
    console.error(err);
  } else {
    // the *entire* stdout and stderr (buffered)
    console.log(`stdout: ${stdout}`);
    console.log(`stderr: ${stderr}`);
  }
});
l
What are you expecting to have happen? If the code is valid, that will run the .sh file during Pulumi's preparation steps (that is, when your Pulumi code is running and defining the expected state). What didn't work?
r
Its working as expected after changing the file permissions
👍 1