Cannot normalise files starting with a hyphen ("-") due to incorrectly calling file(1)
This bug was originally reported by Nathan Rennie-Waldock (nathan.renniewaldock@gmail.com) in Debian bug #924407:
Building a package with a file named "-1.png" resulted in:
dh_strip_nondeterminism -O--buildsystem=golang
file: invalid option -- '1'
file: invalid option -- '.'
file: invalid option -- 'g'
Usage: file [-bcEhikLlNnprsvzZ0] [--apple] [--extension]
[--mime-encoding] [--mime-type]
[-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
file -C [-m magicfiles]
file [--help]
Use of uninitialized value in pattern match (m//) at
/usr/share/perl5/File/StripNondeterminism.pm line 88.
`file` should be ran as `file -- $filename`
Edited by Chris Lamb