Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions apps/studio/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import {
startCliEventsSubscriber,
stopCliEventsSubscriber,
} from 'src/modules/cli/lib/cli-events-subscriber';
import { isStudioCliInstalled } from 'src/modules/cli/lib/ipc-handlers';
import { autoInstallLinuxCliIfNeeded } from 'src/modules/cli/lib/linux-installation-manager';
import { autoInstallMacOSCliIfNeeded } from 'src/modules/cli/lib/macos-installation-manager';
import { autoInstallWindowsCliIfNeeded } from 'src/modules/cli/lib/windows-installation-manager';
Expand Down Expand Up @@ -444,7 +443,6 @@ async function appBoot() {

void ( async () => {
const userData = await loadUserData();
const isCliInstalled = await isStudioCliInstalled();

if ( userData.stopSitesOnQuit !== undefined ) {
shouldStopSitesOnQuit = userData.stopSitesOnQuit;
Expand All @@ -453,13 +451,14 @@ async function appBoot() {
return;
}

if ( ! isCliInstalled || process.env.E2E ) {
if ( process.env.E2E ) {
isQuittingConfirmed = true;
app.quit();
return;
}

const STOP_SITES_BUTTON_INDEX = 0;
const LEAVE_RUNNING_BUTTON_INDEX = 1;
const CANCEL_BUTTON_INDEX = 2;

const { response, checkboxChecked } = await dialog.showMessageBox( {
Expand All @@ -476,7 +475,7 @@ async function appBoot() {
buttons: [ __( 'Stop sites' ), __( 'Leave running' ), __( 'Cancel' ) ],
checkboxLabel: __( "Don't ask again" ),
cancelId: CANCEL_BUTTON_INDEX,
defaultId: STOP_SITES_BUTTON_INDEX,
defaultId: LEAVE_RUNNING_BUTTON_INDEX,
} );

if ( response === CANCEL_BUTTON_INDEX ) {
Expand Down