-
-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support project directories containing underscores #6206
Comments
As you see in the error message, underscores cannot be used in domain names, and so are excluded for that reason. You can easily change the name of your project with |
I have aliases that run a bunch of commands at once when creating a project. But they don't work when the folder name has underscores in it. alias ddev-new='ddev config --project-type=drupal10 --docroot=web --php-version=8.3 --database=mariadb:10.11' I still think it'd be helpful if the command could auto-replace underscores with hyphens. |
I don't see any harm in the suggestion of swapping underscore for hyphen in the default project name. A PR would be welcome. Note that you can also improve your alias to do this quite trivially. Also note that |
10.11 wasn't the default at the time I created the alias, but good to know. I do mostly use it for populated projects, but this way I can use it for a brand new repo as well if I want to.
Something like this? alias ddev-new='ddev config --project-type=drupal10 --docroot=web --php-version=8.3 --database=mariadb:10.11 --project-name=$(basename $(pwd) | tr "_" "-")' |
The pull request has all checks passing. Please review. Also note that I do not have much experience at all with Go or with this codebase. |
No worries, it will get reviewed. It may need some improvement to tests to make sure this permutation gets tested. |
Is there an existing issue for this?
Is your feature request related to a problem?
Drupal modules frequently contain underscores in the project names. It's annoying to have to specify a different project name, or manually convert underscores to hyphens, each time I create a DDEV project for one. It seems a bit arbitrary that underscores aren't allowed.
Describe your solution
Allow underscores in project names.
Describe alternatives
Automatically convert underscores to hyphens and use that as the default project name when running
ddev config
.Additional context
No response
The text was updated successfully, but these errors were encountered: