Skip to content

Commit fe0b5f3

Browse files
committed
Fix CLI usage causing a crash
1 parent a44fbbd commit fe0b5f3

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.5.5
4+
*2021-08-15*
5+
- Fixed a crash occurring when using the CLI.
6+
37
## 1.5.4
48
*2021-08-15*
59
- Fixed CLI options not being able to be negated.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "linguist-js",
3-
"version": "1.5.4",
3+
"version": "1.5.5",
44
"description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.",
55
"main": "dist/index.js",
66
"bin": {

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ for (const arg in args) {
3636
if (args.analyze) {
3737
(async () => {
3838
const root = args.analyze === true ? '.' : args.analyze;
39-
if (args.ignore[0].match(/(?<!\\)[:;|]/)) args.ignore = args.ignore[0].split(/(?<!\\)[:;|]/);
39+
if (args.ignore?.[0].match(/(?<!\\)[:;|]/)) args.ignore = args.ignore[0].split(/(?<!\\)[:;|]/);
4040
const { count, languages, results } = await linguist(root, args);
4141
if (args.summary) {
4242
const { data, markup, programming, prose, total: { bytes: totalBytes } } = languages;

0 commit comments

Comments
 (0)