diff --git a/src/cmd/write-nfo.ts b/src/cmd/write-nfo.ts index e0e2cd3..a00d3b4 100644 --- a/src/cmd/write-nfo.ts +++ b/src/cmd/write-nfo.ts @@ -1,6 +1,7 @@ import type { OptionValues } from "@commander-js/extra-typings"; import { Command, + Argument, Option, InvalidArgumentError, } from "@commander-js/extra-typings"; @@ -189,7 +190,14 @@ export function addNfoCommand(program: Command): void { program .command("write-nfo") .description("write NFO files") - .argument("", "path to anime show directory") + .addArgument( + new Argument("", "path to anime show directory").argParser( + (value: string) => { + if (!path.isAbsolute(value)) return path.resolve(value); + return value; + }, + ), + ) .addOption( new Option( "--aid ",