Compare commits
2 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
da62a0f5c6 | |
|
|
1a0d26f4ca |
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "zwiftout",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.0",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"description": "Zwift workout generator command line tool and library",
|
||||
"author": "Rene Saarsoo <github@triin.net>",
|
||||
|
|
|
|||
|
|
@ -17,13 +17,10 @@ export const parseCliOptions = (): CliOptions => {
|
|||
default: false,
|
||||
});
|
||||
|
||||
argParser.add_argument("file", { nargs: 1 });
|
||||
argParser.add_argument("file", {
|
||||
nargs: "?",
|
||||
default: 0, // Default to reading STDIN
|
||||
});
|
||||
|
||||
// As we only allow one file as input,
|
||||
// convert filenames array to just a single string.
|
||||
const { file, ...rest } = argParser.parse_args();
|
||||
return {
|
||||
file: file[0],
|
||||
...rest,
|
||||
};
|
||||
return argParser.parse_args();
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue