Remove quote stripping code.
I'm guessing it was added due to a misunderstanding of how shell quoting works. When you invoke stow --ignore=".#.*" ... the shell strips out the quotes before the Perl process ever sees them. I can't imagine any sensible scenario in which you would need to invoke stow --ignore='"foo"' but if the user has a filename containing quotes at the beginning and end, they can now choose to ignore it (prior to this patch, they couldn't).
This commit is contained in:
parent
3d414dc071
commit
bcac91d68a
2 changed files with 6 additions and 38 deletions
17
t/stow.t
17
t/stow.t
|
@ -7,7 +7,7 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 10;
|
||||
use Test::More tests => 9;
|
||||
|
||||
use testutil;
|
||||
|
||||
|
@ -71,23 +71,12 @@ local @ARGV = (
|
|||
($options, $pkgs_to_delete, $pkgs_to_stow) = process_options();
|
||||
is_deeply($options->{override}, [qr(\Aman), qr(\Ainfo)] => 'override man and info');
|
||||
|
||||
#
|
||||
# Check stripping any matched quotes
|
||||
#
|
||||
local @ARGV = (
|
||||
"--override='man'",
|
||||
'--override="info"',
|
||||
'dummy'
|
||||
);
|
||||
($options, $pkgs_to_delete, $pkgs_to_stow) = process_options();
|
||||
is_deeply($options->{override}, [qr(\Aman), qr(\Ainfo)] => 'strip shell quoting');
|
||||
|
||||
#
|
||||
# Check setting ignored paths
|
||||
#
|
||||
local @ARGV = (
|
||||
'--ignore="~"',
|
||||
'--ignore="\.#.*"',
|
||||
'--ignore=~',
|
||||
'--ignore=\.#.*',
|
||||
'dummy'
|
||||
);
|
||||
($options, $pkgs_to_delete, $pkgs_to_stow) = process_options();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue