Compare commits

..

No commits in common. "master" and "v2.2.0" have entirely different histories.

2 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "zwiftout",
"version": "2.3.0",
"version": "2.2.0",
"license": "GPL-3.0-or-later",
"description": "Zwift workout generator command line tool and library",
"author": "Rene Saarsoo <github@triin.net>",

View File

@ -17,10 +17,13 @@ export const parseCliOptions = (): CliOptions => {
default: false,
});
argParser.add_argument("file", {
nargs: "?",
default: 0, // Default to reading STDIN
});
argParser.add_argument("file", { nargs: 1 });
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,
};
};