We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 544a303 commit 5664d29Copy full SHA for 5664d29
index.js
@@ -1,6 +1,5 @@
1
#!/usr/bin/env node
2
3
-
4
const cli = require('commander');
5
const util = require('util');
6
const process = require('process');
@@ -12,7 +11,8 @@ cli
12
11
.version(pkg.version, '-v, --version')
13
.parse(process.argv);
14
15
-async function runCommandsIfFileChanged(fileToCheck, commandsList) {
+async function runCommandsIfFileChanged(fileToCheck, commands) {
+ const commandsList = Array.isArray(commands) ? commands : [commands];
16
const commandsString = commandsList.map(x => `"${x}"`).join(' ');
17
const command = `./bin/git-run-if-changed.sh "${fileToCheck}" ${commandsString}`;
18
const response = await exec(command);
0 commit comments