-
Notifications
You must be signed in to change notification settings - Fork 36
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(cli): when error opening a link - show it in console #1385
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
commit: |
apps/cli/src/utils/open.ts
Outdated
// Show url inside coder | ||
if (process.env.CODER_WORKSPACE_AGENT_NAME) { | ||
throw new Error("Cannot open browser in a headless environment"); | ||
} |
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.
Hmm, our problem is not with coder only. Any environment without an x-11 system will fail (e.g. most CI/CD agents). We need to just detect if x11 is missing, and skip opening altogether instead of inferring it based on a specific type of agent (coder).
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.
I rechecked everything - open does work in coder env, but this should be installed sudo apt install xdg-utils
.
The problem was with keytar.
📚 Description
When there is an error opening a link - show in CLI output
🔗 Linked Issue
🧪 Test Plan
📄 Documentation to Update