pytoil icon indicating copy to clipboard operation
pytoil copied to clipboard

[BUG] Inconsistent project naming

Open FollowTheProcess opened this issue 4 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

If you use pytoil to create a new project from a cookiecutter and that cookiecutter modifies the name of the project (e.g. project name to project slug), pytoil will open the wrong thing in VSCode on completion.

I got this to happen when creating a project called async-pytoil with pytoil new async-pytoil --cookie <poetry pypackage>. Because the cookiecutter would have changed async-pytoil to async_pytoil VSCode opened up a random file instead.

The rest of the process was fine, just the call to VSCode.

This might be tricky to fix properly as the replaced project name is only available after the cookiecutter has finished rendering.

Expected Behavior

Should have opened up the newly created async_pytoil folder not a random file called async-pytoil

Steps To Reproduce

pytoil new <something with hyphen> --cookie <template that replaces hyphens with underscores>

Environment

- OS: MacOS
- Python: 3.10
- pytoil: 0.15.1

Anything else?

No response

FollowTheProcess avatar Dec 21 '21 14:12 FollowTheProcess