Skip to content

[update-checkout] Decode stderr from failed update command #40309

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

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Nov 29, 2021

Otherwise, the error message gets printed as a Python binary string, e.g. you see

b'error: Your local changes to the following files would be overwritten by checkout:\n\tinclude/swift/IDE/CodeCompletion.h\n\tutils/update_checkout/update_checkout/update_checkout.py\nPlease commit your changes or stash them before you switch branches.\nAborting\n'

instead of

error: Your local changes to the following files would be overwritten by checkout:
	include/swift/IDE/CodeCompletion.h
	utils/update_checkout/update_checkout/update_checkout.py
Please commit your changes or stash them before you switch branches.
Aborting

Otherwise, the error message gets printed as a Python binary string, e.g. you see
```
b'error: Your local changes to the following files would be overwritten by checkout:\n\tinclude/swift/IDE/CodeCompletion.h\n\tutils/update_checkout/update_checkout/update_checkout.py\nPlease commit your changes or stash them before you switch branches.\nAborting\n'
```
instead of
```
error: Your local changes to the following files would be overwritten by checkout:
	include/swift/IDE/CodeCompletion.h
	utils/update_checkout/update_checkout/update_checkout.py
Please commit your changes or stash them before you switch branches.
Aborting
```
@ahoppen
Copy link
Member Author

ahoppen commented Nov 29, 2021

@swift-ci Please smoke test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate the python strings so much.

@ahoppen ahoppen merged commit 599dbcd into swiftlang:main Dec 1, 2021
@ahoppen ahoppen deleted the pr/decode-update-checkout-error branch December 1, 2021 21:16
@AnthonyLatsis AnthonyLatsis added the update-checkout Area → utils: the `update-checkout` script label Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
update-checkout Area → utils: the `update-checkout` script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants