https://pulumi.com logo
#typescript
Title
# typescript
r

refined-terabyte-65361

01/19/2022, 12:37 AM
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

little-cartoon-10569

01/19/2022, 2:36 AM
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

refined-terabyte-65361

01/19/2022, 7:31 AM
Its working as expected after changing the file permissions
👍 1
2 Views