We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d480538 commit 2a0a53eCopy full SHA for 2a0a53e
src/init.ts
@@ -52,7 +52,7 @@ async function prompt<T>(
52
options: Parameters<typeof consola.prompt>[1],
53
previousValue?: any,
54
): Promise<T> {
55
- const result = await consola.prompt(message, {
+ let result = await consola.prompt(message, {
56
default: previousValue,
57
placeholder: previousValue,
58
...options,
@@ -61,6 +61,9 @@ async function prompt<T>(
61
if (typeof result === 'symbol') {
62
throw Error('Canceled');
63
}
64
+ if (typeof result === 'string') {
65
+ result = result.trim();
66
+ }
67
return result as T;
68
69
0 commit comments