You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2020. It is now read-only.
I'm not sure if this change actually breaks existing behavior, but I think the idea was that if you found a composer.json file, you wanted to exit the do-while loop, not exit only when the while condition is true.
I've added a skip = 1 because we obviously want to skip the composer.json in the box directory (vendor/kerge/box).
I run box using vendor/bin/box on Windows. I think this might be the source of the issue. It appears that under unix variants the box shell script is copied to the vendor/bin folder, while on Windows it simply creates a script that will call the box script from within its folder (so the current working directory is different).
Thus, while realpath($_SERVER['argv'][0]) will return vendor/bin/box under unix variants, it will return vendor/kherge/box/bin/box. Thus, it seems that my fix would most likely break under unix variants.
One suggestion would be to check if the second directory starting from the right is box.
Another one would be to have different behavior based on the platform.
A third one would be to search for any composer.json that does not contain kherge/box as its name, starting from the current script execution path.
There's probably plenty of other ways, although I'm not sure which one is the most appropriate one.
This file contains hidden or 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
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.
I'm not sure if this change actually breaks existing behavior, but I think the idea was that if you found a
composer.jsonfile, you wanted to exit the do-while loop, not exit only when the while condition is true.I've added a
skip = 1because we obviously want to skip the composer.json in theboxdirectory (vendor/kerge/box).