Hi folks, I'm having a bit of trouble with Comman...
# general
t
Hi folks, I'm having a bit of trouble with Command. I have this to generate .env file which are deployed with ansible:
Copy code
const renderEnvCmd = new command.local.Command(`${customer.subDomain}-env`, {
    create: `
      mkdir -p ansible/${customer.subDomain} && \
      cat ansible/env.tmpl | envsubst > ansible/${customer.subDomain}/.env`,
    environment: {
      ...secrets,
      ...postGres,
      BASE_PATH,
      anonJWT,
      serviceJWT,
      smtpPass: cfg.requireSecret("sendinblueSMTP"),
      fqdn: customerDNS,
    },
  });
I'm not sure why, but my .env files aren't being regenerated... Do I have to wire this up in any particular way to make sure the command is evaluated/exectued?
Ah I think I might have figured it out. I need to put one of the output into the stack rather than the command itself edit nope - that's not it
w
What should cause this to rerun? Is there an output from something else that will change to indicate this needs to rerun? You can use the
triggers
property to indicate what triggers should cause this to run. Any change to the values you pass to triggers will cause a recreation of the command, which will re-run its create.