Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSchematics does not prompt for input from user in git bash. #18163
Comments
|
Git Bash is a non-interactive terminal which means our prompt library doesn't work with it. |
|
Why does it work when i run it with schematics path:schematic-name @alan-agius4 |
|
That is an interesting detail. Will need to investigate this a bit more. |
|
What version of Windows is being used? |
Its window 7 enterprise |
| @alan-agius4 you can have a look at the screenshot attached |
|
In the Schematics CLI, the prompts are being displayed because unlike in the Angular CLI we are not checking whether the terminal is TTY. Schematics CLI angular-cli/packages/angular_devkit/schematics_cli/bin/schematics.ts Lines 272 to 273 in 111e9cc NG CLI angular-cli/packages/angular/cli/models/schematic-command.ts Lines 321 to 322 in f4127b5 Can you try to run |
| Here is the output @alan-agius4 |
|
Hi @darpankumar, myself and @clydin had a chat around the issue that you are experiencing and unfortunately this is not something that we can easily replicate as this would require some debugging on your system. I am going to leave the issue open for a couple of days maybe someone else can replicate this debug and be able to find the root cause of the problem. |


Command (mark with an
x)Is this a regression?
No
No Yes, the previous version in which this bug was not present was: ....Description
Either it is custom Schematics or angular Schematics, when I try to run this in git bash it does not prompt for values and runs the whole workflow with default values and if no default value is set it either fail if require flag is true otherwise set the empty value for the input.
even though somebody previously raised this issue
#14938
But it was marked closed
I see this as a bug because it behaves differently in a different terminal. the behaviour should be the same across all the terminal. otherwise, some information must be given BCS of which it is happening.
One observation if you create schematics and test it locally by
A clear and concise description of the problem...npm link path to schematics
and then try to run the schematics with command
schematics path:schematic-name
then it works in git bash as well.
ng new appName
It works fine in command prompt
on mac terminal
vs code terminal
but with git bash it causes problem it do not ask for user input and run the whole workflow with default values
Anything else relevant?