Fix type errors during argument parsing

This commit is contained in:
oldmud0 2019-04-03 16:32:10 -05:00
parent d75cee4996
commit 153c458f9e

View File

@ -40,11 +40,14 @@ argParser.addArgument([ "-e", "--executable" ], {
const { const {
manifestFile, manifestFile,
version, version,
fullZipFile, fullZipFileArgs,
incremental, incrementalArgs,
executable executableArgs
} = argParser.parseArgs(); } = argParser.parseArgs();
const [incrementalZipFile, deletionsFile] = incremental || [];
const [incrementalZipFile, deletionsFile] = incrementalArgs || [];
const [fullZipFile] = fullZipFileArgs || [];
const [executable] = executableArgs || [];
const manifest = JSON.parse(fs.readFileSync(manifestFile)); const manifest = JSON.parse(fs.readFileSync(manifestFile));
@ -71,7 +74,7 @@ manifest.versions = [{
.digest("hex") .digest("hex")
} }
] : undefined, ] : undefined,
update: incremental ? [ update: incrementalArgs ? [
...deleteActions, ...deleteActions,
{ {
action: "dl", action: "dl",