Smartling / smartling-cli

Smartling-cli is a library and CLI tool for managing Smartling projects. See the project's Wiki for user documentation.
https://github.com/Smartling/smartling-cli/wiki
MIT License
16 stars 9 forks source link

1.6 release requires non-empty values in config file even for credentials in command parameters #73

Closed Kwaidan00 closed 4 months ago

Kwaidan00 commented 4 months ago

My CI process of translations manage uses smartling-cli commands with --user and --secret parameters. At the same time my smartling.yml file does not contain user_id or secret to not store credentials with the code. It worked fine since 1.6 release - now I'm getting the following error:

ERROR: failed to load configuration file "***/smartling.yml".
└─ field "user_id" is required, but no value specified

With this undocumented change the working code stopped working, so I consider it as a bug.

Proposed solution I believe the smartling-cli should work for credentials not stored in the YAML file; other words, the loadConfig function should accept the YAML config file without credentials, try to read it from environment variables or parameters, and after that loadConfig should check if the required values were passed in any acceptable way.

Workaround I defined user_id and secret with values fake_value in the smartling.yml.

Affected versions 1.6

dimitrystd commented 4 months ago

Hi @Kwaidan00, This application is deprecated, and all updates and fixes will be made with a low priority. I would recommend using the previous version if it worked for you.

junky commented 4 months ago

Fixed in https://github.com/Smartling/smartling-cli/releases/tag/1.7