Description:
I used ionic cordova resources , and CLI asked me to log into my Ionic Pro account.
Email input is visible and ok.
Password entry is written as: Password: [input is hidden]
But when entering my password, it's not hidden, it's not displaying *!
Steps to Reproduce:
ionic cordova resources
Input:
? Email: [email protected]
? Password: [input is hidden] <It's not!>
Output:
[WARN] You need to be logged into your Ionic account in order to run ionic cordova resources.
Log into your Ionic account
If you don't have one yet, create yours by running: ionic signup
? Email: [email protected]
? Password: [input is hidden] blablablaxxzrgeoizfuefzfez (fake)
√ Collecting resource configuration and source images - done!
√ Filtering out image resources that do not need regeneration - done!
√ Uploading source images to prepare for transformations - done!
√ Generating platform resources: 6 / 6 complete - done!
√ Modifying config.xml to add new image resources - done!
My ionic info:
cli packages: (C:\Users\hugo_torzuoli\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 2.3.0
System:
Node : v7.5.0
npm : 4.1.2
OS : Windows 10
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Other Information:
Happened on _Git Bash_ on _Windows 10_ !
@TorzuoliH I'm going to mark this as a bug, but as far as I can tell there's nothing we can do to fix it. Git Bash does not offer interactivity, so our prompts won't work as expected. It's difficult (maybe impossible?) to detect which terminal emulator is being use. It's trivial to detect the platform, but other terminal emulators in Windows do offer interactivity, even the built-in Command Prompt.
@dwieeb, indeed, I'm not sure it is related to Ionic CLI. But I would like to mention this issue for this particular case. In CMD or Powershell, I'm almost sure it works as expected 😃
CLI 4 now detects lack of interactivity, so this is "fixed" in that if you attempt to login via Git Bash, this error is shown:
❯ ionic login
[WARN] You are already logged in as <email>!
[WARN] Command ran non-interactively due to --no-interactive flag, CI being detected, non-TTY, or a config setting.
[ERROR] email must not be empty.
[ERROR] email is an invalid email address.
[ERROR] password must not be empty.
Use the --help flag for more details.
However, to bypass the error one must type out the credentials in the command itself: ionic login <email> <password>.
There's just no other way to solve this for non-interactive terminals. For Windows, I recommend Command Prompt, PowerShell, Hyper, etc.
Thanks for the issue!
Thanks to you 😄
use
ionic login youremail@domain yourpassword