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 78a4118 commit b418c74Copy full SHA for b418c74
index.js
@@ -11,10 +11,12 @@ cli
11
.version(pkg.version, '-v, --version')
12
.parse(process.argv);
13
14
+const binary = `${__dirname}/bin/git-run-if-changed.sh`;
15
+
16
async function runCommandsIfFileChanged(fileToCheck, commands) {
17
const commandsList = Array.isArray(commands) ? commands : [commands];
18
const commandsString = commandsList.map(x => `"${x}"`).join(' ');
- const command = `./bin/git-run-if-changed.sh "${fileToCheck}" ${commandsString}`;
19
+ const command = `${binary} "${fileToCheck}" ${commandsString}`;
20
const response = await exec(command);
21
const { stdout, stderr } = response;
22
if (stdout) {
0 commit comments