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

Unable to pick choice via firebase init #188

Closed
cedvdb opened this issue Feb 12, 2022 · 6 comments
Closed

Unable to pick choice via firebase init #188

cedvdb opened this issue Feb 12, 2022 · 6 comments

Comments

@cedvdb
Copy link

cedvdb commented Feb 12, 2022

when

    run(
      'firebase init',
      runInShell: true,
    );

The cli does not display the menus, making it impossible to go forward. To reproduce this you need the firebase-cli installed and just run the above code.

maybe related to #187

@bsutton
Copy link
Collaborator

bsutton commented Feb 12, 2022

Why did you using runInShell?

Try start
https://pub.dev/documentation/dcli/latest/dcli/start.html

with the terminal = true option.

@cedvdb
Copy link
Author

cedvdb commented Feb 13, 2022

runInShell was used because without it the firebase command was said to not be in the path. I figured that maybe there was a restriction on using path executables without runInShell, ence why I used it. It correctly launch firebase with it but I'm not sure my reasoning is correct.

Here is are pictures of the different outputs I get depending if I run the command from git bash or from dcli:

image

Here with dcli run (or start with terminal true):

image

As you can see, there is no "Are you ready to proceed ?" on the one ran via dcli.
It seems like that read line by firebase is messing up the piping.

@cedvdb
Copy link
Author

cedvdb commented Feb 13, 2022

FYI why it works with runInShell is maybe bug on windows dart-lang/sdk#38974

and it works when using this:

  return Process.start(
    'firebase',
    ['init'],
    workingDirectory: 'firebase',
    runInShell: true,
    mode: ProcessStartMode.inheritStdio,
  );

@cedvdb cedvdb closed this as completed Feb 13, 2022
@bsutton
Copy link
Collaborator

bsutton commented Feb 13, 2022 via email

@cedvdb
Copy link
Author

cedvdb commented Feb 13, 2022

Running firebase is not the issue this issue is about. I provided pictures to be more precise in a comment above of the different outputs. This issue is about incorrect stdout of the command I'm running.

Anyway, since it works fine with : mode: ProcessStartMode.inheritStdio, I'll stick to that.

@bsutton
Copy link
Collaborator

bsutton commented Feb 13, 2022 via email

gitbook-com bot pushed a commit that referenced this issue Sep 17, 2022
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