File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ export class NoLocalSSHSupportError extends Error {
43
43
44
44
export const SSH_DEST_KEY = 'ssh-dest:' ;
45
45
46
- export function getGitpodRemoteWindowConnectionInfo ( context : vscode . ExtensionContext ) : { connectionInfo : SSHConnectionParams ; remoteUri : vscode . Uri ; sshDestStr :string } | undefined {
47
- const remoteUri = vscode . workspace . workspaceFile || vscode . workspace . workspaceFolders ?. [ 0 ] . uri ;
46
+ export function getGitpodRemoteWindowConnectionInfo ( context : vscode . ExtensionContext ) : { connectionInfo : SSHConnectionParams ; remoteUri : vscode . Uri ; sshDestStr : string } | undefined {
47
+ const remoteUri = vscode . workspace . workspaceFile ?. scheme !== 'untitled'
48
+ ? vscode . workspace . workspaceFile || vscode . workspace . workspaceFolders ?. [ 0 ] . uri
49
+ : vscode . workspace . workspaceFolders ?. [ 0 ] . uri ;
48
50
if ( vscode . env . remoteName === 'ssh-remote' && context . extension . extensionKind === vscode . ExtensionKind . UI && remoteUri ) {
49
51
const [ , sshDestStr ] = remoteUri . authority . split ( '+' ) ;
50
52
const connectionInfo = context . globalState . get < SSHConnectionParams > ( `${ SSH_DEST_KEY } ${ sshDestStr } ` ) ;
You can’t perform that action at this time.
0 commit comments