Skip to content

Commit 789ec20

Browse files
fix: correct value phrasing for mode parsing (#791)
<!-- 👋 Hi, thanks for sending a PR to create-typescript-app! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Addresses an existing open issue: fixes #790 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Makes them bold instead. ![Screenshot of the options from the issue, bold instead of --](https://github.com/JoshuaKGoldberg/create-typescript-app/assets/3335181/5f2f2770-c95d-4b1a-a561-0a65ce0f9eab)
1 parent 86e84ca commit 789ec20

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/bin/mode.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,28 @@ export async function promptForMode(input: boolean | string | undefined) {
3333
return input;
3434
}
3535

36+
const label = (base: string, text: string) => `${chalk.bold(base)} ${text}`;
37+
3638
const selection = filterPromptCancel(
3739
(await prompts.select({
3840
message: chalk.blue("How would you like to use the template?"),
3941
options: [
4042
{
41-
label: "--create a new repository in a child directory",
43+
label: label("create", "a new repository in a child directory"),
4244
value: "create",
4345
},
4446
{
45-
label: "--initialize a freshly repository in the current directory",
47+
label: label(
48+
"initialize",
49+
"a freshly repository in the current directory",
50+
),
4651
value: "initialize",
4752
},
4853
{
49-
label: "--migrate an existing repository in the current directory",
54+
label: label(
55+
"migrate",
56+
"an existing repository in the current directory",
57+
),
5058
value: "migrate",
5159
},
5260
],

0 commit comments

Comments
 (0)