fix(cli): handle init -V with explicit migration error

This commit is contained in:
WadydX
2026-05-10 21:31:17 +01:00
parent e61d1fe002
commit 2778845bd3
3 changed files with 53 additions and 4 deletions
+14
View File
@@ -590,6 +590,12 @@ export default defineCommand({
description: "Path to a video file (MP4, WebM, MOV)",
alias: "v",
},
"video-legacy": {
type: "string",
description: "[renamed] Use --video (or -v) instead of -V.",
alias: "V",
hidden: true,
},
audio: {
type: "string",
description: "Path to an audio file (MP3, WAV, M4A)",
@@ -638,6 +644,14 @@ export default defineCommand({
);
process.exit(1);
}
if (args["video-legacy"] !== undefined) {
console.error(
c.error(
`The -V short flag no longer maps to --video. Use --video (or -v). Example:\n npx hyperframes init ${args.name ?? "my-video"} --video "${args["video-legacy"]}"`,
),
);
process.exit(1);
}
const exampleFlag = args.example;
const videoFlag = args.video;
const audioFlag = args.audio;