View Issue Details

IDProjectCategoryView StatusLast Update
0000263file[All Projects] Generalpublic2021-05-09 22:39
ReporterpeoroAssigned Tochristos 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.40 
Target VersionFixed in Version5.41 
Summary0000263: Shebang patterns only match the beginning of the command, rather than the whole word
DescriptionCurrently, magic patterns that detect files using a shebang only test the beginning of the command string.

A file starting with e.g. `#!/usr/bin/env basher` is detected as "Bourne-Again shell script", even though "basher" is not bash.
The same issue affects every shebang pattern I tried (sh, bash, node, python, perl etc).
Steps To Reproduce$ echo '#!/bin/shawarma' > script
$ file script
script: POSIX shell script, ASCII text executable
TagsNo tags attached.

Activities

christos

2021-05-09 22:39

manager   ~0003605

Fixed, thanks!

Issue History

Date Modified Username Field Change
2021-05-02 19:52 peoro New Issue
2021-05-09 22:39 christos Assigned To => christos
2021-05-09 22:39 christos Status new => assigned
2021-05-09 22:39 christos Status assigned => resolved
2021-05-09 22:39 christos Resolution open => fixed
2021-05-09 22:39 christos Fixed in Version => 5.41
2021-05-09 22:39 christos Note Added: 0003605