-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
add 'installSuccess' flag to telemetry, cache misses if npm install fails #12163
Conversation
} | ||
for (const typing of filteredTypings) { | ||
this.missingTypingsSet[typing] = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's interesting that we mark all the packages as missing. I assume that the npm install command could fail because one package failed, but the rest installed correctly? Or does NPM install in an "all-or-nothing" fashion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is all or nothing
// treat any output on stdout as success | ||
onRequestCompleted(!!stdout); | ||
// treat absence of error as success | ||
onRequestCompleted(!err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we've confirmed that "npm install" returns a non-0 error code across platforms/versions if a package fails to install (and always returns 0 on success, not like "1" if it succeeded with extra info).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that is correct
…ails (#12163) * add 'installSuccess' flag to telemetry, cache misses if npm install fails * fix typo
// cc @mhegazy, @billti