Skip to content

Commit 02201c1

Browse files
committed
Fix argv
1 parent 22fb5c2 commit 02201c1

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ DONE
1717

1818
TODO
1919

20+
- [] NPM i -g not working on Windows
2021
- [] track file deletion or validate that it is working
2122
- [] add commit support?
2223

client.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ const argv = yargs
3333
})
3434
.help()
3535
.alias("help", "h")
36-
.positional("url", {
37-
default: "http://localhost:3000/",
38-
demandOption: false,
39-
describe: `The address the server logged when started. Should look like 'some-random-string.loca.lt'.
40-
If not provided will attach to localhost:3000 scenario where server/client is the same machine`,
41-
type: "string",
42-
})
36+
37+
.usage("$0 [<url>] [-f]", "Connects to a running server", (yargs) =>
38+
yargs.positional("url", {
39+
describe: `The address the server logged when started. Should look like 'some-random-string.loca.lt'.
40+
If not provided will attach to localhost:3000 which is used locally by the server`,
41+
type: "string",
42+
default: "http://localhost:3000/",
43+
})
44+
)
4345
.parseSync(process.argv.slice(2));
4446

4547
// prepare working directory

0 commit comments

Comments
 (0)