fix(scaffold): avoid prompt capture in install wizard

This commit is contained in:
thibaud-lclr 2026-04-15 10:21:53 +02:00
parent f80eebb575
commit b2eebf413e
2 changed files with 3 additions and 2 deletions

View file

@ -346,9 +346,9 @@ prompt() {
local answer="" local answer=""
if [ -n "$default_value" ]; then if [ -n "$default_value" ]; then
printf "%s [%s]: " "$label" "$default_value" printf "%s [%s]: " "$label" "$default_value" >&2
else else
printf "%s: " "$label" printf "%s: " "$label" >&2
fi fi
if [ -r /dev/tty ]; then if [ -r /dev/tty ]; then

View file

@ -120,6 +120,7 @@ func TestGenerateCreatesRecommendedSkeleton(t *testing.T) {
"#!/usr/bin/env bash", "#!/usr/bin/env bash",
`MODULE_PATH="example.com/acme/my-mcp"`, `MODULE_PATH="example.com/acme/my-mcp"`,
`go install "${MODULE_PATH}/cmd/${BINARY_NAME}@latest"`, `go install "${MODULE_PATH}/cmd/${BINARY_NAME}@latest"`,
`printf "%s [%s]: " "$label" "$default_value" >&2`,
"config MCP (Codex)", "config MCP (Codex)",
"config MCP (Claude Desktop)", "config MCP (Claude Desktop)",
`"${PROFILE_ENV}=${profile}"`, `"${PROFILE_ENV}=${profile}"`,