btrfs-progs: tests: make sure _is_file_or_command does not get confused

The test cli/007-check-force reports something like:

$ type -p '--string that starts with dashes'
bash: type: --: invalid option

Add the option/argument separator.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-09-15 16:18:00 +02:00
parent a7e555d706
commit 509af95c92

View File

@ -35,7 +35,7 @@ _is_file_or_command()
if [ -f "$msg" -o -d "$msg" -o -b "$msg" ]; then if [ -f "$msg" -o -d "$msg" -o -b "$msg" ]; then
return 0 return 0
fi fi
msg=$(type -p "$msg") msg=$(type -p -- "$msg")
if [ -f "$msg" ]; then if [ -f "$msg" ]; then
return 0 return 0
fi fi