Address warnings reported by new version of shellcheck.

This commit is contained in:
Trevor Brown 2017-12-27 09:54:00 -05:00
parent 3559f48a6f
commit ee082dc6ee
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ handle_failure() {
handle_cancel() {
local install_path="$1"
echo -e "\nreceived sigint, cleaning up"
echo -e "\\nreceived sigint, cleaning up"
handle_failure "$install_path"
}

View File

@ -58,7 +58,7 @@ write_shim_script() {
cp "$plugin_shims_path/$executable_name" "$shim_path"
elif [ -f "$shim_path" ]; then
if ! grep "# asdf-plugin-version: $version" "$shim_path" > /dev/null; then
sed -i.bak -e "s/\(asdf-plugin: $plugin_name\)/\1\\"$'\n'"# asdf-plugin-version: $version/" "$shim_path"
sed -i.bak -e "s/\\(asdf-plugin: $plugin_name\\)/\\1\\"$'\n'"# asdf-plugin-version: $version/" "$shim_path"
rm "$shim_path".bak
fi
else

View File

@ -261,7 +261,7 @@ get_asdf_config_value_from_file() {
fi
local result
result=$(grep -E "^\s*$key\s*=" "$config_path" | awk -F '=' '{ gsub(/ /, "", $2); print $2 }')
result=$(grep -E "^\\s*$key\\s*=" "$config_path" | awk -F '=' '{ gsub(/ /, "", $2); print $2 }')
if [ -n "$result" ]; then
echo "$result"
fi