View Issue Details

IDProjectCategoryView StatusLast Update
0000336fileGeneralpublic2022-04-04 16:13
Reporterstefanwascoding Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.41 
Fixed in Version5.42 
Summary0000336: using `env` breaks detection of zsh scripts (shown as plain text)
DescriptionScripts using `#!/usr/bin/env zsh` as shebang are detected as text/plain mime type.

Both default detection as well as using "--mime" are broken; `#!/usr/bin/zsh` shows up as "Paul Falstad's zsh script text executable" & "text/x-shellscript", env version shows up as "a /usr/bin/env zsh script text executable" or "text/plain".
Works as expected when using bash in place of zsh.

This might be a regression of https://bugs.astron.com/view.php?id=114
Steps To Reproduceecho '#!/usr/bin/env zsh' > myzshscript && chmod +x myzshscript && file --mime-type myzshscript
TagsNo tags attached.

Activities

polluks

2022-04-04 13:04

reporter   ~0003727

Indeed
$ grep usr/bin/env magic/Magdir/commands
0 search/1 #!/usr/bin/env\ zsh Paul Falstad's zsh script text executable
0 string/fwt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable
0 string/fwt #!\ /usr/bin/env\ fish fish shell script text executable
0 string/fwt #!\ /usr/bin/env\ execlineb execline script text executable

christos

2022-04-04 16:13

manager   ~0003728

Fixed, thanks!

Issue History

Date Modified Username Field Change
2022-04-04 08:29 stefanwascoding New Issue
2022-04-04 13:04 polluks Note Added: 0003727
2022-04-04 16:13 christos Assigned To => christos
2022-04-04 16:13 christos Status new => assigned
2022-04-04 16:13 christos Status assigned => resolved
2022-04-04 16:13 christos Resolution open => fixed
2022-04-04 16:13 christos Fixed in Version => 5.42
2022-04-04 16:13 christos Note Added: 0003728