Fix conflict in --path shorthand with --project, --path shorthand is now -t (target)

This commit is contained in:
Joseph Garrone 2025-01-02 10:24:29 +01:00
parent 083290c6d4
commit 6cc3d4c442
2 changed files with 9 additions and 5 deletions

View File

@ -303,7 +303,7 @@ program
key: "path",
name: (() => {
const long = "path";
const short = "p";
const short = "t";
optionsKeys.push(long, short);
@ -318,11 +318,12 @@ program
.option({
key: "revert",
name: (() => {
const name = "revert";
const long = "revert";
const short = "r";
optionsKeys.push(name);
optionsKeys.push(long, short);
return name;
return { long, short };
})(),
description: [
"Restores a file or directory to its original auto-generated state,",

View File

@ -104,7 +104,10 @@ function addCommentToSourceCode(params: {
`<!--`,
...commentLines.map(
line =>
` ${line.replace("--path", "-p").replace("Before modifying", "Before modifying or replacing")}`
` ${line
.replace("--path", "-t")
.replace("--revert", "-r")
.replace("Before modifying", "Before modifying or replacing")}`
),
`-->`
].join("\n");