File tree Expand file tree Collapse file tree 2 files changed +5
-26
lines changed
Expand file tree Collapse file tree 2 files changed +5
-26
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,11 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
5454
5555 context . subscriptions . push (
5656 vscode . commands . registerCommand ( 'extension.background.uninstall' , async ( ) => {
57- if ( await background . uninstall ( ) ) {
58- // 当且仅当成功删除样式时才会卸载扩展
59- // 否则可能导致没有成功删掉样式时扩展就被卸载掉
60- await vscode . commands . executeCommand ( 'workbench.extensions.uninstallExtension' , EXTENSION_ID ) ;
61- vsHelp . reload ( {
62- message : l10n . t ( 'Background extension has been uninstalled. See you next time!' )
63- } ) ;
64- }
57+ await background . uninstall ( ) ;
58+ await vscode . commands . executeCommand ( 'workbench.extensions.uninstallExtension' , EXTENSION_ID ) ;
59+ vsHelp . reload ( {
60+ message : l10n . t ( 'Background extension has been uninstalled. See you next time!' )
61+ } ) ;
6562 } )
6663 ) ;
6764
Original file line number Diff line number Diff line change @@ -3,11 +3,6 @@ import sudo from '@vscode/sudo-prompt';
33import { vsc } from './vsc' ;
44
55export namespace _ {
6- /**
7- * if zh-CN
8- */
9- export const isZHCN = / ^ z h / . test ( vsc ?. env . language || '' ) ;
10-
116 /**
127 * if desktop
138 *
@@ -17,19 +12,6 @@ export namespace _ {
1712 */
1813 export const isDesktop = vsc ?. env . appHost === 'desktop' ;
1914
20- /**
21- * 等待若干时间
22- *
23- * @export
24- * @param {number } [delay=0]
25- * @return {* }
26- */
27- export function sleep ( delay = 0 ) {
28- return new Promise < void > ( resolve => {
29- setTimeout ( resolve , delay ) ;
30- } ) ;
31- }
32-
3315 /**
3416 * 提权运行
3517 *
You can’t perform that action at this time.
0 commit comments