Skip to content

Commit

Permalink
fix(cli): attempt to fix permissions on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
armano2 committed Feb 8, 2020
1 parent 4c9818d commit 5d6fb5e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions @commitlint/cli/cli-bin.js
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('./lib/cli.js');
2 changes: 1 addition & 1 deletion @commitlint/cli/index.js
@@ -1,3 +1,3 @@
const path = require('path');

module.exports = path.join(__dirname, 'lib/cli.js');
module.exports = path.join(__dirname, 'cli-bin.js');
2 changes: 1 addition & 1 deletion @commitlint/cli/package.json
Expand Up @@ -8,7 +8,7 @@
"!*.test.js*"
],
"bin": {
"commitlint": "./lib/cli.js"
"commitlint": "./cli-bin.js"
},
"scripts": {
"deps": "dep-check",
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/cli/src/cli.test.ts
Expand Up @@ -4,7 +4,7 @@ import execa from 'execa';
import merge from 'lodash/merge';
import fs from 'fs-extra';

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

interface TestOptions {
cwd: string;
Expand Down
12 changes: 7 additions & 5 deletions @commitlint/cli/src/cli.ts 100755 → 100644
@@ -1,4 +1,3 @@
#!/usr/bin/env node
import load from '@commitlint/load';
import lint from '@commitlint/lint';
import read from '@commitlint/read';
Expand Down Expand Up @@ -63,7 +62,8 @@ const cli = yargs
},
from: {
alias: 'f',
description: 'lower end of the commit range to lint; applies if edit=false',
description:
'lower end of the commit range to lint; applies if edit=false',
type: 'string'
},
format: {
Expand All @@ -73,7 +73,8 @@ const cli = yargs
},
'parser-preset': {
alias: 'p',
description: 'configuration preset to use for conventional-commits-parser',
description:
'configuration preset to use for conventional-commits-parser',
type: 'string'
},
quiet: {
Expand All @@ -84,7 +85,8 @@ const cli = yargs
},
to: {
alias: 't',
description: 'upper end of the commit range to lint; applies if edit=false',
description:
'upper end of the commit range to lint; applies if edit=false',
type: 'string'
},
version: {
Expand All @@ -110,7 +112,7 @@ main(cli).catch(err => {
process.exit(1);
}
throw err;
}, 0)
}, 0);
});

async function main(options: CliFlags) {
Expand Down

0 comments on commit 5d6fb5e

Please sign in to comment.