tt
tt copied to clipboard
Please respect TT_CLI_CFG environment variable as a path to tt.yaml
Subject
I use the single tt binary in various $PWD directories, and sometimes the autodiscovery of tt.yaml works as expected, but other times it does not. Having to specify --cfg each time is not always convenient.
Could you please add a feature to retrieve the value from the TT_CLI_CFG environment variable as a path to tt.yaml and use it before the autodiscovery mechanism of tt.yaml?
The path of tt.yaml specified with the --cfg option must take priority over the TT_CLI_CFG environment variable. Therefore, the precedence should be as follows:
- The
--cfgoption, if specified (must throw an error when the file is not readable). - The
TT_CLI_CFGenvironment variable (works the same as--cfg). - The existing autodiscovery mechanism of
tt.yaml.
tt cfg dump should indicate that the configuration was taken from the TT_CLI_CFG environment variable and print the resolved absolute path to tt.yaml.
Since the configuration discovery process is somewhat complex, it would be helpful to have a log message (debug-level) detailing the location of the found configuration file.