Skip to content

Commit 18c12f5

Browse files
committed
rename isRStudioWorkbench to isPositWorkbench
1 parent 24e9355 commit 18c12f5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/command/create/cmd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { kEditorInfos, scanForEditors } from "./editor.ts";
1010

1111
import {
1212
isInteractiveTerminal,
13-
isRStudioWorkbench,
13+
isPositWorkbench,
1414
} from "../../core/platform.ts";
1515
import { runningInCI } from "../../core/ci-info.ts";
1616

@@ -60,7 +60,7 @@ export const createCommand = new Command()
6060
const allowPrompt = isInteractive && !!options.prompt && !options.json;
6161

6262
// Specific case where opening automatically in an editor is not allowed
63-
if (options.open !== false && isRStudioWorkbench()) {
63+
if (options.open !== false && isPositWorkbench()) {
6464
if (options.open !== undefined) {
6565
info(
6666
`The --open option is not supported in Posit Workbench - ignoring`,

src/command/preview/preview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ import {
7676
safeExistsSync,
7777
} from "../../core/path.ts";
7878
import {
79+
isPositWorkbench,
7980
isRStudio,
80-
isRStudioWorkbench,
8181
isServerSession,
8282
isVSCodeServer,
8383
vsCodeServerProxyUri,
@@ -872,7 +872,7 @@ function pdfFileRequestHandler(
872872
const onRequest = pdfOptions.onRequest;
873873
pdfOptions.onRequest = async (req: Request) => {
874874
if (new URL(req.url).pathname === "/") {
875-
const url = isRStudioWorkbench()
875+
const url = isPositWorkbench()
876876
? await rswURL(port, kPdfJsInitialPath)
877877
: isVSCodeServer()
878878
? vsCodeServerProxyUri()!.replace("{{port}}", `${port}`) +

src/core/platform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function isVSCodeServer() {
3434
return !!vsCodeServerProxyUri();
3535
}
3636

37-
export function isRStudioWorkbench() {
37+
export function isPositWorkbench() {
3838
// RS_SERVER_URL e.g. https://daily-rsw.soleng.rstudioservices.com/
3939
// RS_SESSION_URL e.g. /s/eae053c9ab5a71168ee19/
4040
return !!Deno.env.get("RS_SERVER_URL") && !!Deno.env.get("RS_SESSION_URL");
@@ -50,7 +50,7 @@ export function isPositronTerminal() {
5050
}
5151

5252
export function isServerSession() {
53-
return isRStudioServer() || isRStudioWorkbench() || isJupyterServer() ||
53+
return isRStudioServer() || isPositWorkbench() || isJupyterServer() ||
5454
isJupyterHubServer() || isVSCodeServer();
5555
}
5656

src/core/previewurl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import * as colors from "fmt/colors";
1010
import {
1111
isJupyterHubServer,
1212
isJupyterServer,
13+
isPositWorkbench,
1314
isRStudioServer,
14-
isRStudioWorkbench,
1515
isVSCodeServer,
1616
isVSCodeTerminal,
1717
jupyterHubHttpReferrer,
@@ -58,7 +58,7 @@ export async function printBrowsePreviewMessage(
5858
path: string,
5959
) {
6060
if (
61-
(isJupyterServer() || isVSCodeTerminal()) && isRStudioWorkbench()
61+
(isJupyterServer() || isVSCodeTerminal()) && isPositWorkbench()
6262
) {
6363
const url = await rswURL(port, path);
6464
info(`\nPreview server: ${previewURL(host, port, path = "")}`);

0 commit comments

Comments
 (0)