Hello, If I wanted to get the `stack-name` passed ...
# help
v
Hello, If I wanted to get the
stack-name
passed in to the command
sst deploy --stage stage-name stack-name
, is this variable available through env variables, app, or process.argv?
t
Available inside your stack code?
I don't think we make this easy to access but maybe can parse it from
process.argv
v
Yes. I need to conditionally deploy my static web site. It depends on a script running after infrastructure deployment, so I wrap
StaticSite
in an if block. I'm using an environment variable, but knowing if/which stack name was passed in would be cleaner.