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

Launcher fails to pass full path to console #165

Open
johnbburg opened this issue May 28, 2019 · 1 comment
Open

Launcher fails to pass full path to console #165

johnbburg opened this issue May 28, 2019 · 1 comment

Comments

@johnbburg
Copy link

Cross referencing hechoendrupal/drupal-console#3847,

With some debugging, I found that the launcher was starting drupal console with a path argument that was just the name of the directory that contained drupal, but not the full path to it.

@johnbburg
Copy link
Author

Providing more details here, I installed drupal console's latest version via the suggested method in the Readme.

$ curl https://drupalconsole.com/installer -L -o drupal.phar
$ mv drupal.phar /usr/local/bin/drupal
$ chmod +x /usr/local/bin/drupal

Presumably this gives me v1.8.0 as of writing this comment. Drupal console's version is the same (v1.8.0).

When I go to run drupal init (or any drupal console command), I get:

 [ERROR] DrupalConsole must be executed within a Drupal Site. using root web    

With some hacking, I traced what the state of the root was in a few places. My site is running inside a virtual machine, and the drupal root is located at /vagrant/web. At the top of drupal/console/bin/drupal.php, I put these lines:

echo "getcwd()1: \n";
echo getcwd() . "\n";

And the output is:

getcwd()1: 
/vagrant

Then later, when it gets the root from $root = $argvInputReader->get('root'); I dump that output to the cli and I just get web.

I'm not really sure how to debug the launcher itself, it's set up as a phar file.

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

No branches or pull requests

1 participant