Skip to content
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

fix: display system error message when rsconnect.environment inspection fails #639

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Feb 21, 2025

When calling python -m rsconnect.environment with invalid arguments, subprocess.check_output returns a JSON object with a single error field. Passing this result directly to MakeEnvironment results in a KeyError since MakeEnvironment requires additional arguments. This change catches the TypeError and surfaces the underlying error message from subprocess.check_output.

Addresses #635

Copy link

github-actions bot commented Feb 21, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4832 3586 74% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/bundle.py 78% 🟢
TOTAL 78% 🟢

updated for commit: 9e41dcc by action🐍

@tdstein tdstein marked this pull request as ready for review February 21, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant