File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -750,15 +750,22 @@ export class CommandCenter {
750
750
751
751
if ( uri !== undefined ) {
752
752
// Launch desktop client if currently in web
753
+ let target = `${ env . uriScheme } ://vscode.git/clone?url=${ encodeURIComponent ( uri ) } ` ;
753
754
if ( env . uiKind === UIKind . Web ) {
754
- let target = `${ env . uriScheme } ://vscode.git/clone?url=${ encodeURIComponent ( uri ) } ` ;
755
755
if ( ref !== undefined ) {
756
756
target += `&ref=${ encodeURIComponent ( ref ) } ` ;
757
757
}
758
758
return Uri . parse ( target ) ;
759
759
}
760
760
761
- // If already in desktop client, directly clone
761
+ // If already in desktop client but in a remote window, we need to force a new window
762
+ // so that the git extension can access the local filesystem for cloning
763
+ if ( env . remoteName !== undefined ) {
764
+ target += `&windowId=_blank` ;
765
+ return Uri . parse ( target ) ;
766
+ }
767
+
768
+ // Otherwise, directly clone
762
769
void this . clone ( uri , undefined , { ref : ref } ) ;
763
770
}
764
771
}
You can’t perform that action at this time.
0 commit comments