Check if VSCode runs serverless (#118233)

In situations when VSCode runs as remote or serverless we should attempt
authentication flow without a local server.
This commit is contained in:
Oleg Demchenko
2021-03-05 12:08:36 -05:00
committed by GitHub
parent 92ad349125
commit 48be13acf8

View File

@@ -317,7 +317,10 @@ export class AzureActiveDirectoryService {
}
return new Promise(async (resolve, reject) => {
if (vscode.env.remoteName !== undefined) {
const runsRemote = vscode.env.remoteName !== undefined;
const runsServerless = vscode.env.remoteName === undefined && vscode.env.uiKind === vscode.UIKind.Web;
if (runsRemote || runsServerless) {
resolve(this.loginWithoutLocalServer(scope));
return;
}