firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Unable to move down or up the list when using the Git Bash

Open poanchen opened this issue 8 years ago • 14 comments

Version info

Firebase version: 3.17.6 (Latest as of Mar 9, 2018) Git Bash version: 2.15.1.2

Platform Information

Windows 10 Home Version 1709 OS Build 16299.248

Steps to reproduce

  1. Fire up my Git Bash on Windows machine.
  2. cd to my firebase repo location in my machine.
  3. run firebase init
  4. It asked if I am ready to proceed, (I put Y and it moved to the next question)
  5. It asked "Which Firebase CLI features do you want to setup for this folder? Please..."
  6. I then tried to move down the list using my down arrow key but nothing happened. (the cursor does not move)
  7. I changed back to built-in command prompt from Windows and do exactly the same thing and everything worked!

Expected behavior

I should be able to move down or up the list using the arrow key in Git Bash while selecting an option in a list for the command firebase init

Actual behavior

When I try to move down the list using the arrow key. The cursor does not move. This only happens in Git Bash, the built-in command prompt works fine.

Here is the log: Note: no log were produced when down or up arrow key isn't working. However, this is what I got when I ran the firebase init --debug

chenb@LAPTOP-18B5PM7L MINGW64 ~/Downloads/poanchen.firebase.com
$ firebase init --debug
[2018-03-11T20:51:40.225Z] ----------------------------------------------------------------------
[2018-03-11T20:51:40.228Z] Command:       C:\Program Files\nodejs\node.exe C:\Users\chenb\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase init --debug
[2018-03-11T20:51:40.228Z] CLI Version:   3.17.6
[2018-03-11T20:51:40.228Z] Platform:      win32
[2018-03-11T20:51:40.229Z] Node Version:  v8.9.4
[2018-03-11T20:51:40.229Z] Time:          Sun Mar 11 2018 13:51:40 GMT-0700 (Pacific Daylight Time)
[2018-03-11T20:51:40.229Z] ----------------------------------------------------------------------

[2018-03-11T20:51:40.245Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
[2018-03-11T20:51:40.246Z] > authorizing via signed-in user

Thought might be helpful capture8

poanchen avatar Mar 11 '18 21:03 poanchen

yep got the same problem.

SvenBudak avatar Jun 21 '18 21:06 SvenBudak

Interesting. Worth investigating. Thank you for the report.

bkendall avatar Jan 09 '19 01:01 bkendall

Currently I have the same issue, but it affects Windows cmd and Powershell. Tested on node 8.16 with firebase-tools 7.0.0

berhalak avatar Jun 20 '19 06:06 berhalak

https://github.com/firebase/firebase-tools/issues/426#issuecomment-503949030

Worked for me

triay0 avatar Jun 20 '19 09:06 triay0

@berhalak and @triay0 there seem to be some issues with firebase init today, please track #1420 for more information.

samtstern avatar Jun 20 '19 15:06 samtstern

An update has been published for CLI version 7.0.1, and that probably includes the fix on that issue. Update the CLI to the latest version by running npm install --global firebase-tools@latest ... should work.

waswrongassembled avatar Jun 20 '19 18:06 waswrongassembled

Still happening in 7.3.2 in Git Bash on Windows

Maniae avatar Sep 12 '19 19:09 Maniae

Try with CMD in windows, it's works fine :)

mmd-rehan avatar Sep 06 '20 17:09 mmd-rehan

From my screenshot, it does work in CMD in the first place. However, I would imagine that there are some people also use git bash as their terminal choice. Would be nice that it would also work for them.

poanchen avatar Sep 06 '20 17:09 poanchen

This issue persists even in version 8.3.2 in GIT Bash Windows 10!!

apex-blaze avatar Apr 17 '21 14:04 apex-blaze

I'm having this issue still on 10.1.0, anyone know a fix for this because it's annoying.

BrettKessler avatar Jan 18 '22 20:01 BrettKessler

With the prompting from the last comment, I took a look around. The prompt here is powered by Inquirer and as it turns out, they have had this question themselves. The owner of Inquirer says that there's nothing they can do to support git bash.

So, unfortunately, there's not much we're going to be able to do here. If one of the interactive commands are needed, I'd recommend using another terminal. Other commands should work in git bash, but it seems like init is not one of them :(

bkendall avatar Jan 20 '22 03:01 bkendall

Is there any way to detect git bash and provide a helpful warning?

marknadig avatar Feb 08 '22 17:02 marknadig

@marknadig you can use tools like Husky or you might wanna explore more on https://gitexplorer.com/

mmd-rehan avatar Feb 10 '22 14:02 mmd-rehan