diff options
author | David Sterba <dsterba@suse.com> | 2017-09-15 16:18:00 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-25 15:18:05 +0200 |
commit | 509af95c9281549cc93805aca19ed6e7f8de024a (patch) | |
tree | 465f39bcbacb62e4a47c9104a0fb90aa662e73c2 /tests/common | |
parent | a7e555d706c85b9d80160640ca338e85c9056a06 (diff) |
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>
Diffstat (limited to 'tests/common')
-rw-r--r-- | tests/common | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/common b/tests/common index 1c098e8e..eb525a4d 100644 --- a/tests/common +++ b/tests/common @@ -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 |