mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 17:23:56 -05:00
Merge from vscode 966b87dd4013be1a9c06e2b8334522ec61905cc2 (#4696)
This commit is contained in:
@@ -421,8 +421,8 @@ export class WindowsManager implements IWindowsMainService {
|
||||
}
|
||||
|
||||
// When run with --wait, make sure we keep the paths to wait for
|
||||
if (fileInputs && openConfig.cli.wait && openConfig.cli.waitMarkerFilePath) {
|
||||
fileInputs.filesToWait = { paths: [...fileInputs.filesToDiff, ...fileInputs.filesToOpen, ...fileInputs.filesToCreate], waitMarkerFileUri: URI.file(openConfig.cli.waitMarkerFilePath) };
|
||||
if (fileInputs && openConfig.waitMarkerFileURI) {
|
||||
fileInputs.filesToWait = { paths: [...fileInputs.filesToDiff, ...fileInputs.filesToOpen, ...fileInputs.filesToCreate], waitMarkerFileUri: openConfig.waitMarkerFileURI };
|
||||
}
|
||||
|
||||
//
|
||||
@@ -506,8 +506,9 @@ export class WindowsManager implements IWindowsMainService {
|
||||
// If we got started with --wait from the CLI, we need to signal to the outside when the window
|
||||
// used for the edit operation is closed or loaded to a different folder so that the waiting
|
||||
// process can continue. We do this by deleting the waitMarkerFilePath.
|
||||
if (openConfig.context === OpenContext.CLI && openConfig.cli.wait && openConfig.cli.waitMarkerFilePath && usedWindows.length === 1 && usedWindows[0]) {
|
||||
this.waitForWindowCloseOrLoad(usedWindows[0].id).then(() => fs.unlink(openConfig.cli.waitMarkerFilePath!, _error => undefined));
|
||||
const waitMarkerFileURI = openConfig.waitMarkerFileURI;
|
||||
if (openConfig.context === OpenContext.CLI && waitMarkerFileURI && usedWindows.length === 1 && usedWindows[0]) {
|
||||
this.waitForWindowCloseOrLoad(usedWindows[0].id).then(() => fs.unlink(waitMarkerFileURI.fsPath, _error => undefined));
|
||||
}
|
||||
|
||||
return usedWindows;
|
||||
@@ -1216,7 +1217,16 @@ export class WindowsManager implements IWindowsMainService {
|
||||
}
|
||||
|
||||
// Open it
|
||||
this.open({ context: openConfig.context, cli: openConfig.cli, forceNewWindow: true, forceEmpty: !cliArgs.length && !folderUris.length && !fileUris.length, userEnv: openConfig.userEnv, noRecentEntry: true });
|
||||
const openArgs: IOpenConfiguration = {
|
||||
context: openConfig.context,
|
||||
cli: openConfig.cli,
|
||||
forceNewWindow: true,
|
||||
forceEmpty: !cliArgs.length && !folderUris.length && !fileUris.length,
|
||||
userEnv: openConfig.userEnv,
|
||||
noRecentEntry: true,
|
||||
waitMarkerFileURI: openConfig.waitMarkerFileURI
|
||||
};
|
||||
this.open(openArgs);
|
||||
}
|
||||
|
||||
private openInBrowserWindow(options: IOpenBrowserWindowOptions): ICodeWindow {
|
||||
@@ -1557,7 +1567,8 @@ export class WindowsManager implements IWindowsMainService {
|
||||
if (cli && (cli.remote !== remote)) {
|
||||
cli = { ...cli, remote };
|
||||
}
|
||||
return this.open({ context, cli, forceNewWindow: true, forceEmpty: true });
|
||||
const forceNewWindow = !(options && options.reuseWindow);
|
||||
return this.open({ context, cli, forceNewWindow, forceEmpty: true });
|
||||
}
|
||||
|
||||
openNewTabbedWindow(context: OpenContext): ICodeWindow[] {
|
||||
|
||||
Reference in New Issue
Block a user