Skip to content

Commit

Permalink
plugin/java: handle missing argument
Browse files Browse the repository at this point in the history
Provides an error message if no file is specified.
  • Loading branch information
gaelicWizard committed Dec 30, 2021
1 parent 3600e40 commit 8029e7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/available/java.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ cite about-plugin
about-plugin 'Java and JAR helper functions'

function jar_manifest {
about "extracts the specified JAR file's MANIFEST file and prints it to stdout"
group 'java'
param '1: JAR file to extract the MANIFEST from'
example 'jar_manifest lib/foo.jar'
about "extracts the specified JAR file's MANIFEST file and prints it to stdout"
group 'java'
param '1: JAR file to extract the MANIFEST from'
example 'jar_manifest lib/foo.jar'

unzip -c "$1" META-INF/MANIFEST.MF
unzip -c "${1?${FUNCNAME[0]}: manifest must be specified}" META-INF/MANIFEST.MF
}

0 comments on commit 8029e7f

Please sign in to comment.