mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-28 22:54:12 +08:00
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:
parent
a7e555d706
commit
509af95c92
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user