temporalio / cli

Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal
https://docs.temporal.io/cli
MIT License
243 stars 32 forks source link

[Bug] TEMPORAL_ENV may not be working #541

Closed cretz closed 1 month ago

cretz commented 2 months ago

Describe the bug

Confirm TEMPORAL_ENV env var properly sets the equivalent of --env. This may require special handling since that flag is used before others (because it governs what the other flags have to be).

josh-berry commented 2 months ago

Took a quick look at the code and preprocessOptions() does not appear to check the environment variable, but looks directly at the command line arguments. So I think this is an implementation oversight.

(We should probably have more testing around --env in general I think; I noticed another regression around temporal env delete I'll have to either fix or write up properly tomorrow.)