diff --git a/core/oputil/oputil_config.js b/core/oputil/oputil_config.js index 6158359e..dc918917 100644 --- a/core/oputil/oputil_config.js +++ b/core/oputil/oputil_config.js @@ -280,7 +280,7 @@ function getMsgAreaImportType(path) { function importAreas() { const importPath = argv._[argv._.length - 1]; - if(!importPath) { + if(argv._.length < 3 || !importPath || 0 === importPath.length) { return printUsageAndSetExitCode(getHelpFor('Config'), ExitCodes.ERROR); } diff --git a/core/oputil/oputil_help.js b/core/oputil/oputil_help.js index 91973295..7bcb731d 100644 --- a/core/oputil/oputil_help.js +++ b/core/oputil/oputil_help.js @@ -36,18 +36,23 @@ valid args: `usage: optutil.js config [] where is one of: - new : generate a new/initial configuration - import-na [CONF_TAG] : import fidonet *.NA file - if CONF_TAG is not supplied, it will be prompted for + new : generate a new/initial configuration + import-areas PATH : import areas using fidonet *.NA or AREAS.BBS file from PATH + +valid import-areas : + --conf CONF_TAG : specify conference tag in which to import areas + --network NETWORK : specify network name/key to associate FTN areas + --uplinks UL1,UL2,... : specify one or more comma separated uplinks + --type TYPE : specifies area import type. valid options are "bbs" and "na" `, FileBase : `usage: oputil.js fb [] [] where is one of: - scan AREA_TAG|SHA|FILE_ID : scan specified areas + scan AREA_TAG : scan specified areas AREA_TAG may be suffixed with @STORAGE_TAG; for example: retro@bbs - info AREA_TAG|FILE_ID|SHA : display information about areas and/or files + info AREA_TAG|SHA|FILE_ID : display information about areas and/or files SHA may be a full or partial SHA-256 valid scan : diff --git a/core/oputil/oputil_main.js b/core/oputil/oputil_main.js index d27a4976..dad7e4e6 100644 --- a/core/oputil/oputil_main.js +++ b/core/oputil/oputil_main.js @@ -39,6 +39,6 @@ module.exports = function() { break; default: - return printUsageAndSetExitCode('', ExitCodes.BAD_COMMAND); + return printUsageAndSetExitCode(getHelpFor('General'), ExitCodes.BAD_COMMAND); } };