-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[vcpkg_download_distfile] always display output for downloading #40804
Conversation
@FrankXie05 The pr build is failing but seems unrelated to my change. Could you help check or retry the build? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -265,8 +265,9 @@ If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") | |||
WORKING_DIRECTORY "${DOWNLOADS}" | |||
) | |||
|
|||
message("${output}") |
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.
Would it be better instead to just not redirect output in the first place? (That is, remove OUTPUT_VARIABLE
and ERROR_VARIABLE
above entirely rather than reprinting it here?)
Should we get rid of the message
call on line 239 now?
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.
@BillyONeal Thanks for the suggestion.
I think line 239 is still necessary and we can enclose the output like this, which could be better.
message("${output}") | |
if((NOT vcpkg_download_distfile_QUIET) OR (NOT "${error_code}" EQUAL "0")) | |
message("${output}") | |
endif() |
After such a change, the log output is displayed when vcpkg_download_distfile_QUIET
is off or error code is not zero.
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.
After such a change, the log output is displayed when vcpkg_download_distfile_QUIET is off or error code is not zero.
Isn't the whole point of this change that we always want to display the output, even when the exit code is zero?
The |
This is for refinement mentioned in #40810
In vcpkg_download_distfile.cmake, it always hides the output of package downloading via
x-download
unless a failure. This behavior is not so friendly for debugging scenarios which need output. For example, when I configured asset cache with an external tool, I want to know whether the cache is hit.So I propose this change to always show that output.
Before the change
After the change