Skip to content

fix(CLI): Fix creating projects from CLI with spaces in their name (SCD-52)#1042

Merged
BlumMichael merged 2 commits intomainfrom
SCD-52-cli-issue-with-spaces-in-names-of-projects-created-via-the-phrase-init-command
Feb 3, 2026
Merged

fix(CLI): Fix creating projects from CLI with spaces in their name (SCD-52)#1042
BlumMichael merged 2 commits intomainfrom
SCD-52-cli-issue-with-spaces-in-names-of-projects-created-via-the-phrase-init-command

Conversation

@BlumMichael
Copy link
Contributor

@BlumMichael BlumMichael commented Feb 2, 2026

Purpose:

This PR fixes an issue where creating projects from the CLI with spaces in their names was not working correctly. The fix introduces a new Line function that properly handles user input by trimming whitespace, replacing the previous P function which used fmt.Scan and stopped reading at the first whitespace character.

Changes:

  • Introduced a new Line function that reads and trims complete lines of input
  • Updated WithDefault to use Line instead of P for input handling
  • Replaced prompt.P with prompt.Line in the project creation flow

Any affected ticket/issue:

Screenshots:

image image

@BlumMichael BlumMichael changed the title Fix (SCD-52) - Fix creating projects from CLI with spaces in their name Fix(CLI) - Fix creating projects from CLI with spaces in their name (SCD-52) Feb 2, 2026
@BlumMichael BlumMichael changed the title Fix(CLI) - Fix creating projects from CLI with spaces in their name (SCD-52) fix(CLI): Fix creating projects from CLI with spaces in their name (SCD-52) Feb 2, 2026
@BlumMichael BlumMichael requested a review from Copilot February 2, 2026 10:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where creating projects from the CLI with spaces in their names was not working correctly. The fix introduces a new Line function that properly handles user input by trimming whitespace, replacing the previous P function which used fmt.Scan and stopped reading at the first whitespace character.

Changes:

  • Introduced a new Line function that reads and trims complete lines of input
  • Updated WithDefault to use Line instead of P for input handling
  • Replaced prompt.P with prompt.Line in the project creation flow

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
clients/cli/cmd/internal/prompt/prompt.go Added Line function for reading complete lines and updated WithDefault to use it
clients/cli/cmd/internal/prompt/prompt_test.go Added comprehensive test coverage for Line and WithDefault functions
clients/cli/cmd/internal/init.go Updated project name input to use prompt.Line instead of prompt.P

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BlumMichael BlumMichael requested a review from jablan February 2, 2026 10:50
@BlumMichael BlumMichael merged commit 5949dde into main Feb 3, 2026
13 checks passed
@BlumMichael BlumMichael deleted the SCD-52-cli-issue-with-spaces-in-names-of-projects-created-via-the-phrase-init-command branch February 3, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants