Skip to content

Commit a247e8d

Browse files
committed
fix(launcher): default profile
1 parent fa9dfe7 commit a247e8d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

addons/launcher/src/renderer/launcher.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ interface OpenLauncherOptions {
6464
duplicate?: boolean,
6565
}
6666

67-
export async function openLauncher(launcher: Launcher, { tab, command, profile, duplicate }: OpenLauncherOptions = {}) {
67+
export async function openLauncher(launcher: Launcher, options: OpenLauncherOptions = {}) {
68+
let { tab, command, profile, duplicate } = options
6869
if (!tab) {
6970
const launcherTabs = getTerminalTabsByLauncher(launcher)
7071
tab = launcherTabs.length ? launcherTabs[0] : undefined
@@ -76,6 +77,9 @@ export async function openLauncher(launcher: Launcher, { tab, command, profile,
7677
}
7778
return tab
7879
}
80+
if (!profile) {
81+
profile = getLauncherProfile(launcher)
82+
}
7983
if (duplicate) {
8084
return commas.workspace.createTerminalTab(profile, {
8185
command,
@@ -99,7 +103,6 @@ export async function startLauncher(launcher: Launcher, duplicate?: boolean) {
99103
const shellPath = settings['terminal.shell.path']
100104
return openLauncher(launcher, {
101105
command: getLauncherCommand(launcher, shellPath),
102-
profile: getLauncherProfile(launcher),
103106
duplicate,
104107
})
105108
}

0 commit comments

Comments
 (0)