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

View File

@ -104,7 +104,10 @@ function addCommentToSourceCode(params: {
`<!--`, `<!--`,
...commentLines.map( ...commentLines.map(
line => 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"); ].join("\n");