feat(node-subsync): add missing arg msg
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
411e682eaa
commit
0653a897d7
1 changed files with 41 additions and 29 deletions
|
@ -4,6 +4,8 @@ const SUB_EXT_LENGTH = 7;
|
||||||
|
|
||||||
|
|
||||||
const FILE = process.argv[2];
|
const FILE = process.argv[2];
|
||||||
|
|
||||||
|
const main = () => {
|
||||||
const BASE_NAME = FILE.substring(
|
const BASE_NAME = FILE.substring(
|
||||||
FILE.lastIndexOf('/') + 1,
|
FILE.lastIndexOf('/') + 1,
|
||||||
FILE.length - SUB_EXT_LENGTH,
|
FILE.length - SUB_EXT_LENGTH,
|
||||||
|
@ -41,3 +43,13 @@ readdir(DIR, (_, files) => {
|
||||||
// TODO: actually call the command
|
// TODO: actually call the command
|
||||||
console.log(cmd);
|
console.log(cmd);
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
if (FILE) {
|
||||||
|
main();
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.error('Error: no argument passed');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue