Skip to content

Commit 5d6fb5e

Browse files
committed
fix(cli): attempt to fix permissions on linux
1 parent 4c9818d commit 5d6fb5e

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

@commitlint/cli/cli-bin.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node
2+
require('./lib/cli.js');

@commitlint/cli/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
const path = require('path');
22

3-
module.exports = path.join(__dirname, 'lib/cli.js');
3+
module.exports = path.join(__dirname, 'cli-bin.js');

@commitlint/cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"!*.test.js*"
99
],
1010
"bin": {
11-
"commitlint": "./lib/cli.js"
11+
"commitlint": "./cli-bin.js"
1212
},
1313
"scripts": {
1414
"deps": "dep-check",

@commitlint/cli/src/cli.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import execa from 'execa';
44
import merge from 'lodash/merge';
55
import fs from 'fs-extra';
66

7-
const bin = require.resolve('../lib/cli.js');
7+
const bin = require.resolve('../cli-bin.js');
88

99
interface TestOptions {
1010
cwd: string;

@commitlint/cli/src/cli.ts

100755100644
+7-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import load from '@commitlint/load';
32
import lint from '@commitlint/lint';
43
import read from '@commitlint/read';
@@ -63,7 +62,8 @@ const cli = yargs
6362
},
6463
from: {
6564
alias: 'f',
66-
description: 'lower end of the commit range to lint; applies if edit=false',
65+
description:
66+
'lower end of the commit range to lint; applies if edit=false',
6767
type: 'string'
6868
},
6969
format: {
@@ -73,7 +73,8 @@ const cli = yargs
7373
},
7474
'parser-preset': {
7575
alias: 'p',
76-
description: 'configuration preset to use for conventional-commits-parser',
76+
description:
77+
'configuration preset to use for conventional-commits-parser',
7778
type: 'string'
7879
},
7980
quiet: {
@@ -84,7 +85,8 @@ const cli = yargs
8485
},
8586
to: {
8687
alias: 't',
87-
description: 'upper end of the commit range to lint; applies if edit=false',
88+
description:
89+
'upper end of the commit range to lint; applies if edit=false',
8890
type: 'string'
8991
},
9092
version: {
@@ -110,7 +112,7 @@ main(cli).catch(err => {
110112
process.exit(1);
111113
}
112114
throw err;
113-
}, 0)
115+
}, 0);
114116
});
115117

116118
async function main(options: CliFlags) {

0 commit comments

Comments
 (0)