View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000342 | file | General | public | 2022-04-25 06:34 | 2022-04-25 06:34 |
Reporter | jayvdb | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 5.41 | ||||
Summary | 0000342: jar files with POSIX shell script header do not mention they are JAR files | ||||
Description | https://github.com/pinterest/ktlint/releases/download/0.45.2/ktlint is an example of a JAR file with a POSIX shell script header, which looks like --- #!/bin/sh JV=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1) X=$( [ "$JV" -ge "16" ] && echo "--add-opens java.base/java.lang=ALL-UNNAMED" || echo "") exec java $X -Xmx512m -jar "$0" "$@" PK... ``` The java executable can run it as a jar file directly. i.e. the following prints the help on all platforms java -jar /path/to/ktlint --help The file command says it is "POSIX shell script executable (binary data)" When I manually remove the script header, file then reports it as "Zip archive data, at least v1.0 to extract, compression method=deflate" It would be great if it could mention that it is a JAR or ZIP file, perhaps like "POSIX shell script executable (JAR ..)" or "POSIX shell script executable (Zip archive data, ...)" | ||||
Steps To Reproduce | 1. Download https://github.com/pinterest/ktlint/releases/download/0.45.2/ktlint 2. `file ktlint` | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-25 06:34 | jayvdb | New Issue |