Replies: 1 comment 1 reply
-
|
I'd go for the simplest path first, strict project name. We should add validation there. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I get:
If I run:
apm init 4it creates the directory and then continues into the interactive initialization flow.
From the current implementation, it looks like
project_nameis passed directly intoPath(project_name), so/is not being treated as a normal character in a project name. It is being interpreted as a filesystem path separator. In practice,apm init 4/15behaves like an attempt to initialize into the path4/15, but because parent directories are not created recursively, it fails on Windows.I wanted to check whether this behavior is intentional. If not, it may be worth deciding which of these two directions APM should take.
Possible directions
In this model,
apm init 4/15should be rejected as invalid input with a clear error such asInvalid project name, rather than surfacing a low-level filesystem error.In this model,
apm init 4/15would be a supported way to initialize a project inside a nested directory. The command would create parent directories as needed and placeapm.ymlinside4/15.Right now the behavior seems to sit somewhere in between:
That makes the current UX a bit ambiguous.
I’d be interested in hearing which direction maintainers prefer:
project namesemanticsIf helpful, I can also turn this into an issue once the intended behavior is clear.
Beta Was this translation helpful? Give feedback.
All reactions