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

LauncherContainer.php, line 20: Platform Dependent Directory Separator Used #134

Open
LukeLeber opened this issue Nov 9, 2017 · 4 comments

Comments

@LukeLeber
Copy link

LukeLeber commented Nov 9, 2017

The command formed by line 20 of LauncherContainer.php seems to be causing issues on Windows.

C:\Users\lal65\Sites\wcprospect8-dev>drupal site:install
'C:\Users\lal65\Sites\wcprospect8-dev/vendor/drupal/console/bin/drupal' is not recognized as an internal or external command, operable program or batch file.
Wouldn't it make sense to use DIRECTORY_SEPARATOR instead of '/' as in below?

$command = sprintf( '%s'.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'drupal'.DIRECTORY_SEPARATOR.'console'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'drupal --root=%s %s', $options['root'], $options['root'], $this->parseArguments() );

@LukeLeber
Copy link
Author

Actually, after some debugging this may not be the issue.

Adding a 'drupal.bat' file to the drupal/console bin directory seemed to alleviate the problem. Would this be an issue for the drupal/console project and not the launcher?

./vendor/drupal/console/bin/drupal.bat below (added)
@echo off php "%~dp0/drupal.php" %*

@jmolivas
Copy link
Member

@LukeLeber show we include this drupal.bat or a similar file on the repository for WinOS?, to avoid this issue.

@LukeLeber
Copy link
Author

Hi @jmolivas,

I think that adding the file to the drupal/console would fix this for windows users. Would you like me to make a pull request on that repo?

@jmolivas
Copy link
Member

@LukeLeber Yes please, once we merge we will need to update the docs to reflect this feature.

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

2 participants