path: root/debian
diff options
authorIan Jackson <>2019-05-26 10:50:23 +0100
committerIan Jackson <>2019-05-26 11:11:38 +0100
commitd28467db161d0590469b5f8e1115f84858d66e06 (patch)
tree7a9ae9a05a7ed734f03ffc20c3e5619b2a3ad75e /debian
parent4615f2d1c695caf9b04719f51d57dfae539bb712 (diff)
Replace `confess $!' with `confess "$!"', to actually print errno
$ perl -e 'use Carp; open X, ">/dev/eacces" or die $!' Permission denied at -e line 1. $ perl -e 'use Carp; open X, ">/dev/eacces" or confess $!' at -e line 1. $ perl -e 'use Carp; open X, ">/dev/eacces" or confess "$!"' Permission denied at -e line 1. $ confess will get references to its arguments in @_. Its documentation says it saves/restores $!. I conjecture that these interact as we see here: $ perl -e '$!=1; sub x { print ">@_<\n"; } x $!;' >Operation not permitted< $ perl -e '$!=1; sub x { local $!; print ">@_<\n"; } x $!;' >< Quoting "$!" averts the reference (and it will also ensure that we get the string value of $!, in case confess were to do anything in the future which would mess that up). This commit was made like this: perl -i -pe 's/confess \$!/confess "\$!"/g' dgit perl -i -pe 's/confess \$!/confess "\$!"/g' git-debrebase perl -i -pe 's/confess \$!/confess "\$!"/g' Debian/ I have manually reviewed each hunk and it all looks good to me. Closes: #929549 Signed-off-by: Ian Jackson <>
Diffstat (limited to 'debian')
0 files changed, 0 insertions, 0 deletions