-
Notifications
You must be signed in to change notification settings - Fork 389
create - force --no-open when inside Posit Workbench
#12967
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
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
|
Tested manually on Posit workbench - No new window opened. |
jthomasmock
left a comment
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.
LGTM other than a minor nit about RStudio Workbench vs Posit Workbench.
src/command/create/cmd.ts
Outdated
| const allowPrompt = isInteractive && !!options.prompt && !options.json; | ||
|
|
||
| // Specific case where opening automatically in an editor is not allowed | ||
| if (options.open !== false && isRStudioWorkbench()) { |
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.
Minor nit and this might be an older boolean, but isPositWorkbench would be more appropriate.
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.
Yes this is an older function
quarto-cli/src/core/platform.ts
Lines 37 to 41 in 24e9355
| export function isRStudioWorkbench() { | |
| // RS_SERVER_URL e.g. https://daily-rsw.soleng.rstudioservices.com/ | |
| // RS_SESSION_URL e.g. /s/eae053c9ab5a71168ee19/ | |
| return !!Deno.env.get("RS_SERVER_URL") && !!Deno.env.get("RS_SESSION_URL"); | |
| } |
I did not bother renaming, but I can for sure.
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.
Done in 18c12f5
Probably best to also change in quarto-dev/quarto ?
closes #12965
@jthomasmock, @MariaSemple, this is simple tweak to force
--no-openwhen inside workbench.I added info message in case a user is explicitly setting
--open <editor name>to explain this is not permitted.I'll manually test it somewhere I can access.
Is there any other specific behavior it should have in the Workbench context? Should we open automatically or prompt to open, but in a different way?
You can also test this PR by cloning, switching branch and installing from source Quarto dev version