When formatting provided site name, only remove .tld if it's at the end #1297
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(copied from Issue #1298 for context):
Description:
TL;DR: If your site name contains your TLD (e.g. if your TLD is
.test
and your site name contains.test
) it will be removed inappropriately.In line with our regular site setup we have the same locally with valet:
The moment it goes wrong is when I try to use the
isolate
option. Then I get an error:portal-work isn't found as site name
. That is correct as it is indeedportal.test-work
. The problem seems to be that.test
is removed not just at the end, but just as it is found in the site name.Searches on internet doesn't bring any solutions to the table.
Steps To Reproduce:
portal.test-work
Solutions in this PR:
Fixes #1295, Fixes #1298.