fix: 修复 Windows trans 编码与参数传递
This commit is contained in:
@@ -768,6 +768,24 @@ async function main(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (top === "trans" || top === "tran") {
|
||||
const error = new Error(`${top} is a PATH wrapper, not a bun scripts/cli.ts subcommand`);
|
||||
Object.assign(error, {
|
||||
name: "TransEntrypointMigrationError",
|
||||
code: "trans-root-cli-entrypoint-moved",
|
||||
level: "error",
|
||||
entrypoint: top,
|
||||
operation: "root-cli-dispatch",
|
||||
replacementExamples: {
|
||||
canonical: `trans ${sub ?? "<route>"} ${args.slice(2).join(" ") || "<operation>"}`,
|
||||
legacyUnified: `bun scripts/cli.ts ssh ${sub ?? "<route>"} ${args.slice(2).join(" ") || "<operation>"}`,
|
||||
},
|
||||
migrationHint: "Use: trans <route> <operation> [args...]. The PATH wrapper delegates to the lightweight SSH CLI.",
|
||||
note: "Ordinary root CLI commands continue to use bun scripts/cli.ts <command>.",
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
|
||||
throw new Error(`Unknown command: ${commandName}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user