Open Closed

ABP NEW CLI fails to handle user paths with spaces due to missing wrapping quotes #8145


User avatar
0
tulsalor created

The ABP NEW CLI tool fails to execute commands when the %USERPROFILE% contains a space. For example, if the user profile is located in a path like "C:\Users\Name Surname", the CLI command fails with an error because the path is not properly wrapped in quotes. However, it works correctly for paths without spaces (e.g., "C:\Users\Name").

  • ABP Framework version: latest
  • Exception message and full stack trace:
    > abp bundle
[04:28:58 INF] You are running the second generation of the ABP CLI. If you're interested in the legacy CLI, see https://abp.io/new-cli
[04:28:59 ERR] 'C:\Users\Name ' is not recognized as an internal or external command,
[04:28:59 ERR] operable program or batch file.
  • Steps to reproduce the issue:
    1. Create a user profile on a Windows machine where the username contains a space (e.g., Name Surname).
    2. Install the ABP CLI.
    3. Run abp bundle command from anywhere.
    4. Observe the command failure due to improper handling of the path with spaces.

Expected Behavior: The ABP CLI should wrap the path in quotes and handle paths containing spaces correctly, allowing the command to succeed.

Actual Behavior: The command fails when the path contains spaces because the ABP CLI does not wrap the user path in quotes. This results in the tool interpreting the path as multiple arguments instead of a single valid file path.


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks. We will fix this. your ticket has been refunded.

  • User Avatar
    0
    tulsalor created

    Great, thank you!

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

Made with ❤️ on ABP v9.1.0-preview. Updated on October 22, 2024, 09:35