diff --git a/lib/commands/command-reshim.bash b/lib/commands/command-reshim.bash index 9461f7cc4..f39c0377d 100644 --- a/lib/commands/command-reshim.bash +++ b/lib/commands/command-reshim.bash @@ -70,7 +70,7 @@ write_shim_script() { if [ -f "$shim_path" ]; then if ! grep -x "# asdf-plugin: ${plugin_name} ${version}" "$shim_path" >/dev/null; then sed -i.bak -e "s/exec /# asdf-plugin: ${plugin_name} ${version}\\"$'\n''exec /' "$shim_path" - rm "$shim_path".bak + rm -f "$shim_path".bak fi else cat <"$shim_path" diff --git a/lib/commands/reshim.bash b/lib/commands/reshim.bash index 21e13b3c5..40865f1c2 100644 --- a/lib/commands/reshim.bash +++ b/lib/commands/reshim.bash @@ -20,6 +20,6 @@ remove_shim_for_version() { if ! grep "# asdf-plugin:" "$shim_path" >/dev/null || [ "$count_installed" -eq 0 ]; then - rm "$shim_path" + rm -f "$shim_path" fi } diff --git a/lib/commands/version_commands.bash b/lib/commands/version_commands.bash index a80eff1a7..8f8f70ef1 100644 --- a/lib/commands/version_commands.bash +++ b/lib/commands/version_commands.bash @@ -60,7 +60,7 @@ version_command() { if [ -f "$file" ] && grep "^$plugin_name " "$file" >/dev/null; then sed -i.bak -e "s|^$plugin_name .*$|$plugin_name ${resolved_versions[*]}|" "$file" - rm "$file".bak + rm -f "$file".bak else printf "%s %s\\n" "$plugin_name" "${resolved_versions[*]}" >>"$file" fi