Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

Build task fail if there is other composer.json in home directory #143

Open
konradpodgorski opened this issue May 19, 2016 · 1 comment
Open

Comments

@konradpodgorski
Copy link

I had empty composer.json file in my home directory (created by mistake, not sure why it existed there)

this composer.json was loaded instead of one from project root directory, because it didn't include vendor-dir script pretty much fail with the following error.

Might be a good idea to limit searching in parent directories to the directory from where task is actually run. https://github.com/box-project/box2/blob/2.0/bin/box#L37-L49

$ ./vendor/bin/box build -v
PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'The Composer class loader "/Users/konrad/vendor/autoload.php" could not be found.' in /Users/konrad/projects/acme-project/generator/vendor/kherge/box/bin/box:89
Stack trace:
#0 /Users/konrad/projects/acme-project/generator/vendor/kherge/box/bin/box(16): loadComposerClassloader('/Users/konrad/p...')
#1 {main}
  thrown in /Users/konrad/projects/acme-project/generator/vendor/kherge/box/bin/box on line 89

Fatal error: Uncaught exception 'RuntimeException' with message 'The Composer class loader "/Users/konrad/vendor/autoload.php" could not be found.' in /Users/konrad/projects/acme-project/generator/vendor/kherge/box/bin/box:89
Stack trace:
#0 /Users/konrad/projects/acme-project/generator/vendor/kherge/box/bin/box(16): loadComposerClassloader('/Users/konrad/p...')
#1 {main}
  thrown in /Users/konrad/projects/acme-project/generator/vendor/kherge/box/bin/box on line 89
@kherge
Copy link
Contributor

kherge commented May 20, 2016

I'm not sure how this would work for running Box from installations that are not in the current working directory path.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants