Skip to content

Commit

Permalink
fix: keep_download condition
Browse files Browse the repository at this point in the history
improve condition readability
  • Loading branch information
Birdie0 committed Apr 19, 2024
1 parent 947f19b commit fac0459
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/functions/installs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ install_tool_version() {
# Remove download directory if --keep-download flag or always_keep_download config setting are not set
if [ -d "$download_path" ]; then
always_keep_download=$(get_asdf_config_value "always_keep_download")
if [ "$keep_download" != "true" ] && [ "$always_keep_download" != "yes" ]; then
rm -r "$download_path"
else
if [ "$keep_download" = "true" ] || [ "$always_keep_download" = "yes" ]; then
printf '%s\n' "asdf: Warn: You have configured asdf to preserve downloaded files (with always_keep_download=yes or --keep-download). But" >&2
printf '%s\n' "asdf: Warn: the current plugin ($plugin_name) does not support that. Downloaded files will not be preserved." >&2
else
rm -r "$download_path"
fi
fi

Expand Down

0 comments on commit fac0459

Please sign in to comment.