mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-18 18:04:26 +00:00
fix: add deprecation warning when --agents is used
generate.ts and manifest.ts now warn when --agents (deprecated) is used instead of --agent. Message: "Warning: --agents is deprecated, use --agent instead (--agents will be removed in v2.0)" Findings 3 (scan.ts stderr) and 4 (translate.ts stderr) skipped: error() from onboarding goes to stdout via clack — this is the standard pattern across all migrated commands. Changing individual commands would break consistency.
This commit is contained in:
@@ -536,6 +536,9 @@ ${trustScore.warnings.length > 0 ? `\nWarnings:\n${trustScore.warnings.map((w) =
|
||||
let targetAgents: string[];
|
||||
|
||||
if (this.agents) {
|
||||
if (process.argv.includes('--agents')) {
|
||||
console.warn('Warning: --agents is deprecated, use --agent instead (--agents will be removed in v2.0)');
|
||||
}
|
||||
targetAgents = this.agents.split(',').map((a) => a.trim());
|
||||
} else {
|
||||
const agentOptions = [
|
||||
|
||||
@@ -159,6 +159,9 @@ export class ManifestAddCommand extends Command {
|
||||
}
|
||||
|
||||
if (this.agents) {
|
||||
if (process.argv.includes('--agents')) {
|
||||
console.warn('Warning: --agents is deprecated, use --agent instead (--agents will be removed in v2.0)');
|
||||
}
|
||||
options.agents = this.agents.split(',').map(s => s.trim());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user