linode-cli icon indicating copy to clipboard operation
linode-cli copied to clipboard

Add suppress-version-warning config option

Open jriddle-linode opened this issue 1 year ago • 0 comments

📝 Description

What does this PR do and why is this change necessary?

Adds get_bool('value') method for configuration options and adds a step in configuration to support suppress-version-warning. Also adds support for LINODE_CLI_SUPPRESS_VERSION_WARNING environment variable.

✔️ How to Test

What are the steps to reproduce the issue or verify the changes?

  1. Install the new version of the CLI
make install
  1. Go through the configuration process
lin configure
  1. The last question should ask you about suppressing API Version Warnings
  2. Use the CLI and see if you view this warning

Environment variable

  1. Install the new CLI or delete the value from your config
  2. Use the cli after setting the environment variable
export LINODE_CLI_SUPPRESS_VERSION_WARNING=true
lin linodes ls
unset $LINODE_CLI_SUPPRESS_VERSION_WARNING
lin linodes ls
  1. Verify the output doesn't have the error.

How do I run the relevant unit/integration tests?

make testunit

resolves #582

jriddle-linode avatar Aug 16 '24 20:08 jriddle-linode