Skip to content

[BUG] apm init treats project name containing '/' as a filesystem path #723

@edenfunf

Description

@edenfunf

Describe the bug
When running `apm init` with a project name that contains `/` (e.g. `apm init 4/15`), the argument is passed directly into `Path(project_name)`, causing `/` to be interpreted as a filesystem path separator. On Windows this produces a low-level OS error instead of a clear validation message.

To Reproduce

  1. Run `apm init 4/15`
  2. Observe: `[x] Error initializing project: [WinError 3] The system cannot find the path specified: '4\15'`

Expected behavior
`apm init` should reject project names containing path separators (`/` or `\) with a clear error: \Invalid project name '4/15': project names must not contain path separators`.

Environment:

  • OS: Windows 11
  • Python Version: 3.13.4
  • APM Version: 0.8.11

Additional context
Discussed in #718. Maintainer confirmed the preferred direction: strict project name semantics with input validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedDeprecated: use status/accepted. Kept for issue history; will be removed in milestone 0.10.0.bugDeprecated: use type/bug. Kept for issue history; will be removed in milestone 0.10.0.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions