diff --git a/index.ts b/index.ts index 82ba91306..678195855 100644 --- a/index.ts +++ b/index.ts @@ -6,6 +6,7 @@ import gracefulFs from 'graceful-fs'; import semver from 'semver'; import Logger from './src/console/logger.js'; +import LogLevel from './src/console/logLevel.js'; import ProgressBarCLI from './src/console/progressBarCli.js'; import Constants from './src/constants.js'; import Igir from './src/igir.js'; @@ -18,7 +19,7 @@ import Options from './src/types/options.js'; gracefulFs.gracefulify(realFs); (async (): Promise => { - const logger = new Logger(); + const logger = new Logger(LogLevel.TRACE); logger.printHeader(); if (!semver.satisfies(process.version, Constants.ENGINES_NODE)) { diff --git a/src/modules/argumentsParser.ts b/src/modules/argumentsParser.ts index 5d15b6fb2..e5d424b2e 100644 --- a/src/modules/argumentsParser.ts +++ b/src/modules/argumentsParser.ts @@ -63,7 +63,13 @@ export default class ArgumentsParser { * Parse the arguments. */ parse(argv: string[]): Options { - this.logger.trace(`Parsing CLI arguments: ${argv}`); + const argvString = argv.map((arg) => { + if (!arg.includes(' ')) { + return arg; + } + return `"${arg.replace(/"/g, '\\"')}"`; + }).join(' '); + this.logger.trace(`Parsing CLI arguments: ${argvString}`); const groupRomInput = 'ROM input options:'; const groupDatInput = 'DAT input options:';