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

Having trouble getting output on Windows #1810

Open
tdmalone opened this issue Dec 18, 2017 · 19 comments
Open

Having trouble getting output on Windows #1810

tdmalone opened this issue Dec 18, 2017 · 19 comments

Comments

@tdmalone
Copy link
Contributor

Expected behavior

Expected the standard wp-cli help output, eg:

NAME

  wp

DESCRIPTION

  Manage WordPress through the command-line.

SYNOPSIS

  wp <command>

SUBCOMMANDS

  cache               Manage the object cache.
  cap                 Manage user capabilities.
  checksum            Verify WordPress core checksums.
  cli                 Review current WP-CLI info, check for updates, or see
                      defined aliases.
  comment             Manage comments.

...

Actual behavior

On my Linux box, this works as expected.

On my Windows box, I get the following output in Mingw64 (aka git bash):

$ terminus wp SITE_NAME.dev -- help
 [notice] Command: SITE_NAME.dev -- wp help [Exit: 0]

And in cmd:

C:\Users\Tim>terminus wp SITE_NAME.dev -- help
 [notice] Command: SITE_NAME.dev -- wp help [Exit: 1]
 [error]

No other command output is given, including what the error message was when running through cmd.

(Note I have replaced the actual site name with SITE_NAME above, as it is for a client's site).

Steps to reproduce the behavior

  1. Install and auth terminus, and set up an SSH key in the Pantheon user dashboard
  2. Run terminus wp SITE_NAME.dev --help
$ terminus self:info
 ------------------------- -----------------------------------------------
  PHP binary                C:\xampp71\php\php.exe
  PHP version               7.1.11
  php.ini used              C:\xampp71\php\php.ini
  Terminus project config
  Terminus root dir         C:\Users\Tim\vendor\pantheon-systems\terminus
  Terminus version          1.6.1
  Operating system          build 15063 (Windows 10)
 ------------------------- -----------------------------------------------
@djmaschinen
Copy link

I am having the same issue running Drush commands on Windows. I am able to confirm that some commands (for example enabling a module) do, in fact, work via the UI, however there is no confirmation dialog written to the CLI. Commands where return output is required are consequently unusable.

PHP binary C:\xampp\php\php.exe
PHP version 7.1.7
php.ini used C:\xampp\php\php.ini
Terminus project config
Terminus root dir C:\Users\acampbell\terminus
Terminus version 1.6.2-dev
Operating system build 7601 (Windows 7 Enterprise Edition Service
Pack 1)

@alexdicianu
Copy link
Contributor

This happened to another customer of ours running Windows 10. Regular terminus commands (other than drush) seem to work fine. When running drush, there's no output, but there is an [Exit: 0] status.

https://i.imgur.com/cC3BWn4.png

@tdmalone
Copy link
Contributor Author

This is definitely still an issue. Could I request perhaps an alert when running wp/drush on Windows, I imagine similar to the 'you're in git mode, switch to SFTP mode if you're updating plugins', so that we don't end up running terminus wp commands that we need the output for?

@sarahg
Copy link

sarahg commented Mar 14, 2018

Ran into this with another customer on Windows 10 running wp-cli commands. His commands executed, but we didn't get any output. Attaching screenshot showing command/output/Terminus info.

screen

@djmaschinen
Copy link

After many hours of troubleshooting and discussions with Pantheon support, it came out that Windows is unsupported.

If you are running Windows 10, you can run successfully terminus commands from an Ubuntu shell. See: https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/

If you are running Windows 7... you are pretty much SOL and will need to either VirtualBox or ssh into a Linux server and run commands from there.

@DigitalSolace
Copy link

I spent the best part of a day configuring Terminus on windows 10 only to run into this issue when testing Drush commands.

Are there any plans in the future to support running Terminus on Windows 10 using Git BASH?

@mhmobley85
Copy link

Same issue. No output running under Windows 7 via command line or git bash. Tried Virtual Box VM running Centos 7 on same laptop and still no output. Pantheon support suggested +1 on this issue.

@dariogcode
Copy link

Same issue in Win 10


PHP binary F:\PHP\php.exe
PHP version 7.2.9
php.ini used C:\WINDOWS\php.ini
Terminus project config
Terminus root dir F:\terminus\vendor\pantheon-systems\terminus
Terminus version 1.8.1
Operating system build 17134 (Windows 10)


@dariogcode
Copy link

As workaround in Win 10 I ended using the method suggested by @djmaschinen, installing linux subsystem (Ubuntu), following instructions from here: https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/

@jlandrum
Copy link

jlandrum commented Nov 1, 2018

@tilon And you haven't had any issues? When I try running terminus through WLS, it hangs. According to the logs, after it fetches all the necessary site info and displays the warning about being in git mode (a warning that makes no sense to me considering I'm not touching files but that's unrelated) - it completely stops. No network calls are executed.

@tdmalone
Copy link
Contributor Author

tdmalone commented Nov 2, 2018

It’s been 11 months since this issue was opened - any chance of a warning within the CLI, or at least a response from Pantheon?

@greg-1-anderson
Copy link
Member

This work has not been prioritized for any sprint, as far as I know.

In the Drush issue queue, a lot of work has gone into interprocess calls in drush-ops/drush#3758. The underlying code there is very similar to what Terminus is doing. Any assistance provided to ensure that Drush produces the correct output on Windows would ultimately benefit Terminus.

@dariogcode
Copy link

@tilon And you haven't had any issues? When I try running terminus through WLS, it hangs. According to the logs, after it fetches all the necessary site info and displays the warning about being in git mode (a warning that makes no sense to me considering I'm not touching files but that's unrelated) - it completely stops. No network calls are executed.

I didn't remember, but I could work using Terminus in Ubuntu under Win 10.

@JeffreyPia
Copy link

Still an issue for me on Win10. Commands execute, but not output other than [Exit: 0].

@greg-1-anderson
Copy link
Member

Strangely enough, we still have not had any reports in as to whether or not Drush 9 remote commands work under Windows.

@danheisel
Copy link

This is something I have struggled with since my agency began using Pantheon three and a half years ago. We're all Win 10 without much choice to use anything else. Frankly, I'm fine with Win 10 anyway. Our team does well with Win 10 and we have a good set of tools for design and development. That being said, Terminus runs just fine for us except for the silent failures from Drush. They are a huge headache when attempting to run Drush or WP commands that should work. Typos are the exception and I'm not talking about them at all. I'm talking about receiving an Exit 1, 126 or 255 with no other information at all. Even successful Drush commands can be problematic. If we wish to use Drush to list the available user roles or even the installed modules, we are out of luck. Both simply return an Exit 0. I have opened chats with Pantheon support staff and even spoken with some on the Terminus team at DrupalCon in Seattle 2019. I find it odd that more verbose error reporting for Win 10 has not made its way to running Drush commands via Terminus. This is a missing feature that honestly has caused some frustrations and prevented us from fully adopting Terminus into our processes. I know we can run the commands through a Linux terminal but honestly, that's a pain. Seems there are plenty of Win 10 users with Pantheon accounts who would love to see this feature.

We love using Terminus and Drush to manage the 80+ sites in our account. Both are vital to speedy development and support, but the lack of verbose error reporting is a huge frustration.

@greg-1-anderson
Copy link
Member

@danheisel Could you try Drush 9 with Pantheon aliases, and see if commands such as drush @pantheon.mysite.dev status show output on Windows?

@danheisel
Copy link

Yeah , you bet. If it fixes it, that would be awesome. This would be project by project though, correct? We have a base installation we use for all Drupal sites. Most are on D7, so Drush 9 will not be possible. However, running this on our D8.4 and up sites would help quite a bit. I did forget that Win 10 now has Linux shells in the store. I have not had a chance to try them out. Have to get desktop support to allow the installation. That may help a ton too.

@danheisel
Copy link

Well, I got hopeful because the cache:clear command returned a verbose error message asking to select an option. That seems to kind of work. Unfortunately, successful messages are still muted, So no listing of modules or user roles. I also noticed that other Exit 1s still mute the error. Thanks!

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

No branches or pull requests