Skip to content

Commit 3ec5a08

Browse files
authored
--diff on workspace files opens the workspace instead of diff-ing them (fix microsoft#149731) (microsoft#155011)
1 parent a74ce8a commit 3ec5a08

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vs/platform/windows/electron-main/windowsMainService.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,12 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic
785785

786786
private doExtractPathsFromCLI(cli: NativeParsedArgs): IPath[] {
787787
const pathsToOpen: IPathToOpen[] = [];
788-
const pathResolveOptions: IPathResolveOptions = { ignoreFileNotFound: true, gotoLineMode: cli.goto, remoteAuthority: cli.remote || undefined, forceOpenWorkspaceAsFile: false };
788+
const pathResolveOptions: IPathResolveOptions = {
789+
ignoreFileNotFound: true,
790+
gotoLineMode: cli.goto,
791+
remoteAuthority: cli.remote || undefined,
792+
forceOpenWorkspaceAsFile: cli.diff && cli._.length === 2 // special case diff mode to force open workspace as file (https://github.com/microsoft/vscode/issues/149731)
793+
};
789794

790795
// folder uris
791796
const folderUris = cli['folder-uri'];

0 commit comments

Comments
 (0)