mirror of
https://github.com/jimeh/dotify.git
synced 2026-02-19 10:06:39 +00:00
Make dotify-action error out when given invalid actions
This commit is contained in:
@@ -7,5 +7,11 @@ dotify-action() {
|
||||
action="$DOTIFY_OPT_DEFAULT_ACTION"
|
||||
fi
|
||||
|
||||
! valid_action="$(command -v "dotify-action-${action}")"
|
||||
if [ -z "$valid_action" ]; then
|
||||
echo "ERROR: \"$action\" is not a valid action." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
dotify-action-${action} "$source" "$target"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user