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>
master
David Sterba 2017-09-15 16:18:00 +02:00
parent a7e555d706
commit 509af95c92
1 changed files with 1 additions and 1 deletions

View File

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