Skip to content
Snippets Groups Projects
Commit 86d1a255 authored by Jani Nikula's avatar Jani Nikula
Browse files

dim: return exit status instead of actually exiting from url_to_remote


This lets us handle url_to_remote failures gracefully where they're not
fatal. Our use of 'set -e' guarantees this will bail out otherwise.

Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 450b8729
No related branches found
No related tags found
No related merge requests found
......@@ -205,7 +205,7 @@ function url_to_remote # url
if [[ -z "$url" ]]; then
echoerr "$0 without url"
exit 1
return 1
fi
remote=$(git remote -v | grep -m 1 "$url" | cut -f 1)
......@@ -215,10 +215,12 @@ function url_to_remote # url
echoerr "Please set it up using:"
echoerr " $ git remote add <name> $url"
echoerr "with a name of your choice."
exit 1
return 1
fi
echo $remote
return 0
}
function branch_to_remote # branch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment