-
Notifications
You must be signed in to change notification settings - Fork 698
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
Fix link command's --isolate
argument with custom name
#1428
Merged
mattstauffer
merged 6 commits into
laravel:master
from
mcaskill:improve-link-subcommands
Sep 25, 2023
Merged
Fix link command's --isolate
argument with custom name
#1428
mattstauffer
merged 6 commits into
laravel:master
from
mcaskill:improve-link-subcommands
Sep 25, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mcaskill
changed the title
Fix link command's
Fix link command's Jul 16, 2023
--isolate
argument--isolate
argument with custom name
👍 Looks good to me. Thanks for all your work on this! |
driesvints
reviewed
Jul 25, 2023
driesvints
reviewed
Jul 26, 2023
Passing a custom hostname to the `link` command with the `--isolate` argument will result in either a mismatched site being isolated or the site not being found ("The [example] site could not be found in Valet's site list."). The reason for this is because the `isolate` command defaults to using the current directory's _name_ which won't match the custom hostname. This issue does not affect the `secure` command because it resolves the hostname from the current directory's _full path_. This commit passes the hostname (either custom or the current directory's name) to both sub-commands to ensure consistency of operations. Note: A bug introduced in mnapoli/silly v1.8.1 breaks all arguments in `runCommand()` method. See mnapoli/silly#69 for details and mnapoli/silly#70 for pull request.
This matches the isolate command's usage of `Site::phpRcVersion()`.
Based on `PhpFpmTest::test_isolate_will_isolate_a_site()` and `CliTest::test_link_command_with_secure_flag_secures()`.
Silly v1.5.0 introduced improvements on command arguments and options that are used by Valet.
mcaskill
force-pushed
the
improve-link-subcommands
branch
from
September 8, 2023 19:41
12cda63
to
f9ee253
Compare
I've rebased the latest changes. |
Thank you so much @mcaskill, and thanks as always @drbyte and @driesvints! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to #1386.
Tested in laravel/valet v4.1.2 with mnapoli/silly v1.8.2 and symfony/console v6.2.5.
🟡 Unfortunately, a bug introduced in mnapoli/silly v1.8.1 breaks all arguments inrunCommand()
method preventing this pull request from resolving the isolation issue. See mnapoli/silly#69 for details and mnapoli/silly#70 for pull request.🟢 Bug resolved in mnapoli/silly v1.8.3.
Passing a custom hostname to the
link
command with the--isolate
argument will result in either a mismatched site being isolated or the site not being found:The reason for this is because the
isolate
command defaults to using the current directory's name which won't match the custom hostname.This issue does not affect the
secure
command because it resolves the hostname from the current directory's full path.This pull request passes the hostname (regardless if custom or the current directory's name) to both sub-commands to ensure consistency of operations.