You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnlocalResult??remoteResult??webResult??newMarkdownString().appendText(nls.localize('cannot be installed',"Cannot install the '{0}' extension because it is not available in this setup.",extension.displayName??extension.identifier.id));
2434
+
// If any of the canInstall checks returned a message about not being allowed, prioritize that
2435
+
// Otherwise return platform compatibility or other messages
2436
+
constallResults: IMarkdownString[]=[];
2437
+
constisMarkdownString=(r: true|IMarkdownString|undefined): r is IMarkdownString=>{
2438
+
returnr!==undefined&&r!==true;
2439
+
};
2440
+
if(isMarkdownString(localResult)){
2441
+
allResults.push(localResult);
2442
+
}
2443
+
if(isMarkdownString(remoteResult)){
2444
+
allResults.push(remoteResult);
2445
+
}
2446
+
if(isMarkdownString(webResult)){
2447
+
allResults.push(webResult);
2448
+
}
2449
+
2450
+
constnotAllowedResult=allResults.find(r=>r.value.includes('not in the allowed list')||r.value.includes('not allowed'));
2451
+
if(notAllowedResult){
2452
+
returnnewMarkdownString(nls.localize('extension not allowed to install',"This extension cannot be installed because it is not in the allowed list."));
2453
+
}
2454
+
2455
+
// Return the first error message, or a generic message if none
2456
+
if(allResults.length>0){
2457
+
returnallResults[0];
2458
+
}
2459
+
returnnewMarkdownString().appendText(nls.localize('cannot be installed',"Cannot install the '{0}' extension because it is not available in this setup.",extension.displayName??extension.identifier.id));
0 commit comments