You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ansible to bootstrap a development environment. Part of this process is installing asdf along with some plugins. Prior to installing a plugin, I run asdf plugin list to see if that plugin is already installed. When no plugins are installed, asdf plugin list will return a non-zero exit code - which ansible recognizes as a failure. To me, having no plugins and attempting to list all installed plugins should just return an empty list - not a failure code.
It's not a big deal though - the workaround I'm doing is:
- name: get asdf plugin list
command:
cmd: "asdf plugin list"
register: asdf_plugin_list
failed_when: asdf_plugin_list.rc != 0 and 'No plugins installed' not in asdf_plugin_list.stderr
Buuut, I wouldn't mind throwing up a PR to address this if you're willing!
The text was updated successfully, but these errors were encountered:
We have many people requesting many different behaviours of errors and exit codes. For greater context, can you find the original PR/issue that introduced this so we can capture the history of the decision before we consider a change?
Lol, it was me! Since this isn't technically an error in the tool, I am happy for this to be changed to exit 0 and to not use display_error, but rather just print the information with printf to the user.
I'm using ansible to bootstrap a development environment. Part of this process is installing asdf along with some plugins. Prior to installing a plugin, I run
asdf plugin list
to see if that plugin is already installed. When no plugins are installed,asdf plugin list
will return a non-zero exit code - which ansible recognizes as a failure. To me, having no plugins and attempting to list all installed plugins should just return an empty list - not a failure code.It's not a big deal though - the workaround I'm doing is:
Buuut, I wouldn't mind throwing up a PR to address this if you're willing!
The text was updated successfully, but these errors were encountered: