Skip to content

Commit b418c74

Browse files
committed
Run git-run-if-changed.sh relative to index.js
1 parent 78a4118 commit b418c74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ cli
1111
.version(pkg.version, '-v, --version')
1212
.parse(process.argv);
1313

14+
const binary = `${__dirname}/bin/git-run-if-changed.sh`;
15+
1416
async function runCommandsIfFileChanged(fileToCheck, commands) {
1517
const commandsList = Array.isArray(commands) ? commands : [commands];
1618
const commandsString = commandsList.map(x => `"${x}"`).join(' ');
17-
const command = `./bin/git-run-if-changed.sh "${fileToCheck}" ${commandsString}`;
19+
const command = `${binary} "${fileToCheck}" ${commandsString}`;
1820
const response = await exec(command);
1921
const { stdout, stderr } = response;
2022
if (stdout) {

0 commit comments

Comments
 (0)