-
Notifications
You must be signed in to change notification settings - Fork 335
Include NuGet console output on failures. #1800
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
Conversation
…caching. Prior to this we were dropping NuGet console output on the floor requiring folks to use --debug. There is a behavior change here in that if the exit code was 0 before but the console output included "Authentication may require manual action." we would print a warning anyway, now the warning is only printed on failure. Drive by: Audit for 'Nuget' -> 'NuGet' for correct branding.
| if (!m_cmd.push(msg_sink, nupkg_path, nuget_sources_arg({&write_src, 1}))) | ||
| { | ||
| msg_sink.println(Color::error, | ||
| msg::format(msgPushingVendorFailed, msg::vendor = "NuGet", msg::path = write_src) | ||
| .append_raw('\n') | ||
| .append(msgSeeURL, msg::url = docs::troubleshoot_binary_cache_url)); |
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.
Previously this replaced all rich error information from NuGet with the generic msgPushingVendorFailed. Ditto below
| WarningDiagnosticContext wdc{console_diagnostic_context}; | ||
| m_cmd.install(wdc, packages_config, m_packages, m_src); |
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.
This previously entirely ignored all output from NuGet!
Prior to this we were dropping NuGet console output on the floor requiring folks to use --debug. There is a behavior change here in that if the exit code was 0 before but the console output included "Authentication may require manual action." we would print a warning anyway, now the warning is only printed on failure. Drive by: Audit for 'Nuget' -> 'NuGet' for correct branding.
report_nonzero_exit_codeandreport_nonzero_exit_code_and_output, and teach to avoid printing the console output when echo_in_debug--debugwill do anything for the push operation. In particular that isn't safe in the face of pipelined uploads and we shouldn't be recommending--debugin any case. (We still claim that--debugdoes something for uploads)Related: microsoft/vcpkg#43309