Skip to content

Commit 06346c8

Browse files
save
1 parent ddb9cfd commit 06346c8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

routed-js/routed.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,17 @@ async function main() {
3333
})
3434
.help('h')
3535
.alias('h', 'help')
36+
.strict()
3637
.argv;
3738
if (argv.version) {
3839
// TODO: print real version
3940
process.stdout.write('v5.27.0\n');
4041
return;
4142
}
43+
if (argv._.length == 0 && !argv.shared_memory) {
44+
// TODO: show usage
45+
return;
46+
}
4247
const osrm = new OSRMWrapper_1.OSRMWrapper({
4348
path: argv._[0],
4449
dataset_name: argv.dataset_name,

routed-js/routed.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ async function main() {
3131
})
3232
.help('h')
3333
.alias('h', 'help')
34+
.strict()
3435
.argv;
3536

3637
if (argv.version) {
@@ -39,6 +40,11 @@ async function main() {
3940
return;
4041
}
4142

43+
if (argv._.length == 0 && !argv.shared_memory) {
44+
// TODO: show usage
45+
return;
46+
}
47+
4248
const osrm = new OSRMWrapper({
4349
path: argv._[0],
4450
dataset_name: argv.dataset_name,

0 commit comments

Comments
 (0)