File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { kEditorInfos, scanForEditors } from "./editor.ts";
10
10
11
11
import {
12
12
isInteractiveTerminal ,
13
- isRStudioWorkbench ,
13
+ isPositWorkbench ,
14
14
} from "../../core/platform.ts" ;
15
15
import { runningInCI } from "../../core/ci-info.ts" ;
16
16
@@ -60,7 +60,7 @@ export const createCommand = new Command()
60
60
const allowPrompt = isInteractive && ! ! options . prompt && ! options . json ;
61
61
62
62
// Specific case where opening automatically in an editor is not allowed
63
- if ( options . open !== false && isRStudioWorkbench ( ) ) {
63
+ if ( options . open !== false && isPositWorkbench ( ) ) {
64
64
if ( options . open !== undefined ) {
65
65
info (
66
66
`The --open option is not supported in Posit Workbench - ignoring` ,
Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ import {
76
76
safeExistsSync ,
77
77
} from "../../core/path.ts" ;
78
78
import {
79
+ isPositWorkbench ,
79
80
isRStudio ,
80
- isRStudioWorkbench ,
81
81
isServerSession ,
82
82
isVSCodeServer ,
83
83
vsCodeServerProxyUri ,
@@ -872,7 +872,7 @@ function pdfFileRequestHandler(
872
872
const onRequest = pdfOptions . onRequest ;
873
873
pdfOptions . onRequest = async ( req : Request ) => {
874
874
if ( new URL ( req . url ) . pathname === "/" ) {
875
- const url = isRStudioWorkbench ( )
875
+ const url = isPositWorkbench ( )
876
876
? await rswURL ( port , kPdfJsInitialPath )
877
877
: isVSCodeServer ( )
878
878
? vsCodeServerProxyUri ( ) ! . replace ( "{{port}}" , `${ port } ` ) +
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export function isVSCodeServer() {
34
34
return ! ! vsCodeServerProxyUri ( ) ;
35
35
}
36
36
37
- export function isRStudioWorkbench ( ) {
37
+ export function isPositWorkbench ( ) {
38
38
// RS_SERVER_URL e.g. https://daily-rsw.soleng.rstudioservices.com/
39
39
// RS_SESSION_URL e.g. /s/eae053c9ab5a71168ee19/
40
40
return ! ! Deno . env . get ( "RS_SERVER_URL" ) && ! ! Deno . env . get ( "RS_SESSION_URL" ) ;
@@ -50,7 +50,7 @@ export function isPositronTerminal() {
50
50
}
51
51
52
52
export function isServerSession ( ) {
53
- return isRStudioServer ( ) || isRStudioWorkbench ( ) || isJupyterServer ( ) ||
53
+ return isRStudioServer ( ) || isPositWorkbench ( ) || isJupyterServer ( ) ||
54
54
isJupyterHubServer ( ) || isVSCodeServer ( ) ;
55
55
}
56
56
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import * as colors from "fmt/colors";
10
10
import {
11
11
isJupyterHubServer ,
12
12
isJupyterServer ,
13
+ isPositWorkbench ,
13
14
isRStudioServer ,
14
- isRStudioWorkbench ,
15
15
isVSCodeServer ,
16
16
isVSCodeTerminal ,
17
17
jupyterHubHttpReferrer ,
@@ -58,7 +58,7 @@ export async function printBrowsePreviewMessage(
58
58
path : string ,
59
59
) {
60
60
if (
61
- ( isJupyterServer ( ) || isVSCodeTerminal ( ) ) && isRStudioWorkbench ( )
61
+ ( isJupyterServer ( ) || isVSCodeTerminal ( ) ) && isPositWorkbench ( )
62
62
) {
63
63
const url = await rswURL ( port , path ) ;
64
64
info ( `\nPreview server: ${ previewURL ( host , port , path = "" ) } ` ) ;
You can’t perform that action at this time.
0 commit comments