-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Angular CLI 12.2.0 fails "ng add" with "Command aborted." without confirmation prompt #21512
Comments
@alan-agius4 The From Node's docs: https://nodejs.org/api/tty.html#tty_tty
When I run the same commands locally I get the same results: Screenshot proof: This the code I added in
Gives me this output:
So why is |
After some more digging, when I try to get Here's my code (in
Gives me this output:
And yet, running
any ideas? |
That is interesting, not sure how to debug this from my end since I don’t have a Windows machine. In the past we did see a number of TTY issues with GitBash and typically they were never actionable form our end. In most cases these were address by Node.JS as far as I can tell. |
@alan-agius4 I just realised that the error is because |
So that's narrowing it down... UPDATE: So apparently the culprit is the |
Correct, running Running Can't we replace Update: I changed my #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/node_modules/@angular/cli/bin/ng" "$@"
else
exec node "$basedir/node_modules/@angular/cli/bin/ng" "$@"
fi to #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
node "$basedir/node_modules/@angular/cli/bin/ng" "$@"
else
node "$basedir/node_modules/@angular/cli/bin/ng" "$@"
fi And yet Perhaps as an immediate workaround, add a warning output to |
I've raised a bug with NodeJS here: nodejs/node#39673 UPDATE: So while the root cause is that As a quality-of-life improvement, I suggest the |
@Jehoel, the mentioned shell script is actually generated by NPM and not Angular. |
…sing `--skip-confirmation` during `ng add` Closes #21512
All ng add commands are not working for me either.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Did this behavior use to work in the previous version?
Yes
Yes, the previous version in which this bug was not present was: ....
v11 (I haven't used other v12.x versions)
Description and 🔬 Minimal Reproduction
ng add
always fails with "Command abort.ed" unless I add--skip-confirmation
.--verbose
.For example:
🌍 Your Environment
Anything else relevant?
I fiddled with
add-impl.js
to see why it wasn't prompting and I think the problem isadd-impl.js
hasif( !tty_1.isTTY ) {
butprompt.js
hasif (!tty_1.isTTY()) {
, so isisTTY
a function or a getter-property?The text was updated successfully, but these errors were encountered: