Repository navigation
fix: point users to --api-key when rp login fails #678
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,6 +126,19 @@ def run_install(version: str) -> None: | |
| # -- passive background check ------------------------------------------- | ||
|
|
||
|
|
||
| def cached_newer_version() -> Optional[str]: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The four branches here (no or stale cache, missing |
||
| """fresh cached latest release only if newer than current; None otherwise.""" | ||
| cache = _read_cache() | ||
| if not cache or not _cache_fresh(cache): | ||
| return None | ||
| latest = cache.get("latest_version") | ||
| if not latest: | ||
| return None | ||
| if compare_versions(parse_version(latest), parse_version(current_version())) > 0: | ||
| return latest | ||
| return None | ||
|
|
||
|
|
||
| def _read_cache() -> Optional[dict]: | ||
| try: | ||
| return json.loads(CACHE_PATH.read_text(encoding="utf-8")) | ||
|
|
||
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.
If the failing run was
rp login --profile staging, following this hint as written stores the key under the default profile, so the nextrp --profile staging ...still has no credentials. Could the hint include--profile {profile}when it isn't the default?