mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-06 05:07:29 +01:00
1 parent
e96fcce300
commit
08069da007
1 file changed
+2
-6
@@ -2004,12 +2004,8 @@ export function validateTerminalName(name: string): { content: string, severity:
|
||||
}
|
||||
|
||||
function convertOptionsOrProfileToOptions(optionsOrProfile?: ICreateTerminalOptions | ITerminalProfile): ICreateTerminalOptions | undefined {
|
||||
if (typeof optionsOrProfile === 'object') {
|
||||
if ('profileName' in optionsOrProfile) {
|
||||
return { config: optionsOrProfile as ITerminalProfile, location: (optionsOrProfile as ICreateTerminalOptions).location };
|
||||
} else if ('location' in optionsOrProfile) {
|
||||
return { location: (optionsOrProfile as ICreateTerminalOptions).location };
|
||||
}
|
||||
if (typeof optionsOrProfile === 'object' && 'profileName' in optionsOrProfile) {
|
||||
return { config: optionsOrProfile as ITerminalProfile, location: (optionsOrProfile as ICreateTerminalOptions).location };
|
||||
}
|
||||
return optionsOrProfile;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user