[CP] Fix dart pub login
#49146
Labels
area-dart-cli
Use area-dart-cli for issues related to the 'dart' command like tool.
cherry-pick-approved
Label for approved cherrypick request
cherry-pick-review
Issue that need cherry pick triage to approve
Commit(s) to merge
42e12a50de5371b4107ae1860945dcdf6ebb32fd (sdk/+/246582)
Target
stable
Issue Description
Fix
dart pub login
due to unexpectednull
in response.What is the fix
The command crashed because the metadata end-point returned
null
forthe name property. This fix handles invalid responses more gracefully,
and handles the case where
name
isnull
, by not displaying the name.Why cherry-pick
Users who was already logged was able to continue publish packages, but
displaying the login status using
dart pub login
was broken.Attempts to login would also cause a crash after successful
authentication, before credentials were saved.
Risk
low (changes only affect the
dart pub login
command, which is fairly broken).Issue link(s)
dart-lang/pub#3424
Extra Info
This bumps
pub_rev
with two new commits, see diff: dart-lang/pub@a949b32...cherry-pick-for-2.17.2The text was updated successfully, but these errors were encountered: