pocketfullofcheese
pocketfullofcheese

Reputation: 8857

how do I know what version of gjslint I have installed?

This may be a dumb question, but I cannot figure it out. Doing gjslint --help does not provide the answer, and --version is not a valid flag.

Any ideas?

Upvotes: 0

Views: 422

Answers (2)

Paul S.
Paul S.

Reputation: 1573

This one-liner prints out only the version number, convenient eg. if you want to use it in a script:

which gjslint | xargs cat | grep "ENTRY-SCRIPT" | sed 's|.*closure-linter==\([.0-9]*\).*|\1|'

Upvotes: 0

Zabba
Zabba

Reputation: 65497

Run this command:

cat `which gjslint` | grep [0-9] --color=always

or

cat $(which gjslint) | grep [0-9] --color=always

Upvotes: 4

Related Questions