MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / normalizeUserArgs

Function normalizeUserArgs

src/cli.ts:56–66  ·  view source on GitHub ↗
(argv: string[])

Source from the content-addressed store, hash-verified

54 skipSkillInstall: options.skipSkillInstall,
55 });
56 } catch (err) {
57 console.error(chalk.red(`Packaging failed: ${err}`));
58 process.exit(1);
59 }
60 });
61
62function normalizeUserArgs(argv: string[]): string[] {
63 if (argv.length === 0) return argv;
64
65 // In some Electron fork setups, cli path is injected into user args.
66 // Strip the duplicated CLI path so commander sees the real command first.
67 const firstArg = argv[0];
68 if (firstArg && path.resolve(firstArg) === cliFilePath) {
69 return argv.slice(1);

Callers 1

cli.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected