Skip to content
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

#101 corrected scanned locations for installed.json and composer.json #102

Conversation

Ocramius
Copy link
Owner

@Ocramius Ocramius commented Jul 17, 2019

Due to getcwd() returning an empty string in some environments, (or even ".", a dot, sometimes), this fallback versions logic was too fragile.

Adding hardcoded paths that are supposed to be constant (relative to the installation path of FallbackVersions.php) gives us more stability.

Fixes #101

…son`

Due to `getcwd()` returning an empty string in some environments, (or even
`"."`, a dot, sometimes), this fallback versions logic was too fragile.

Adding hardcoded paths that are supposed to be constant (relative to the
installation path of `FallbackVersions.php`) gives us more stability.
@Ocramius Ocramius added the bug label Jul 17, 2019
@Ocramius Ocramius added this to the 1.5.1 milestone Jul 17, 2019
@Ocramius Ocramius self-assigned this Jul 17, 2019
Otherwise, composer cannot determine the current branch-alias, and fails
early during installation.
@Ocramius Ocramius force-pushed the fix/#101-correct-fallback-versions-behavior-with-no-scripts-installation branch 2 times, most recently from b46d6c1 to cfd925d Compare July 17, 2019 15:33
@Ocramius Ocramius force-pushed the fix/#101-correct-fallback-versions-behavior-with-no-scripts-installation branch from cfd925d to 1053ea0 Compare July 17, 2019 15:39
@Ocramius Ocramius merged commit 1d32342 into master Jul 17, 2019
@Ocramius Ocramius deleted the fix/#101-correct-fallback-versions-behavior-with-no-scripts-installation branch July 17, 2019 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot locate composer.lock nor installed.json when using package with --no-scripts
1 participant