Compare commits
No commits in common. "master" and "v2.2.0" have entirely different histories.
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "zwiftout",
|
"name": "zwiftout",
|
||||||
"version": "2.3.0",
|
"version": "2.2.0",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"description": "Zwift workout generator command line tool and library",
|
"description": "Zwift workout generator command line tool and library",
|
||||||
"author": "Rene Saarsoo <github@triin.net>",
|
"author": "Rene Saarsoo <github@triin.net>",
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,13 @@ export const parseCliOptions = (): CliOptions => {
|
||||||
default: false,
|
default: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
argParser.add_argument("file", {
|
argParser.add_argument("file", { nargs: 1 });
|
||||||
nargs: "?",
|
|
||||||
default: 0, // Default to reading STDIN
|
|
||||||
});
|
|
||||||
|
|
||||||
return argParser.parse_args();
|
// 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,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue