diff --git a/lib/commands/command-reshim.bash b/lib/commands/command-reshim.bash index 9461f7cc..f39c0377 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 21e13b3c..40865f1c 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 a80eff1a..8f8f70ef 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