Skip to content

Fix crash on flutter update-packages#28922

Merged
cbracken merged 1 commit intoflutter:masterfrom
cbracken:err-message
Mar 6, 2019
Merged

Fix crash on flutter update-packages#28922
cbracken merged 1 commit intoflutter:masterfrom
cbracken:err-message

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Mar 6, 2019

When running git update-packages, if the goldens repo is dirty, the
flutter tool currently crashes and logs the failure from git pull.

This adds a check for a dirty git client and emits a friendlier error
message in the case where it's not clean, and avoid the crash by
catching the NonZeroExitCode exception and rethrowing as toolExit
instead.

Fixes: #28915

@cbracken cbracken changed the title Improve error messaging when checkout is dirty Improve update-packages error msg if checkout is dirty Mar 6, 2019
@cbracken cbracken changed the title Improve update-packages error msg if checkout is dirty Fix crash on flutter update-packages Mar 6, 2019
@dnfield
Copy link
Contributor

dnfield commented Mar 6, 2019

LGTM

When running git update-packages, if the goldens repo is dirty, the
flutter tool currently crashes and logs the failure from git pull.

This adds a check for a dirty git client and emits a friendlier error
message in the case where it's not clean, and avoid the crash by
catching the NonZeroExitCode exception and rethrowing as toolExit
instead.

Fixes: flutter#28915
@jamesderlin
Copy link
Contributor

LGTM.

@cbracken cbracken merged commit 52e4214 into flutter:master Mar 6, 2019
@cbracken cbracken deleted the err-message branch March 6, 2019 17:14
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter tool crashes when running flutter-update packages

4 participants