dialogService.show(Severity.Info,nls.localize('warnEscalation',"Code will now prompt with 'osascript' for Administrator privileges to install the shell command."),buttons,{cancelId:1}).then(result=>{
this.dialogService.show(Severity.Info,nls.localize('warnEscalation',"Code will now prompt with 'osascript' for Administrator privileges to install the shell command."),buttons,{cancelId:1}).then(result=>{
const{choice}=awaitdialogService.show(Severity.Info,nls.localize('warnEscalationUninstall',"Code will now prompt with 'osascript' for Administrator privileges to uninstall the shell command."),buttons,{cancelId:1});
switch(choice){
case0/* OK */:
constcommand='osascript -e "do shell script \\"rm \''+target+'\'\\" with administrator privileges"';
promisify(cp.exec)(command,{})
.then(undefined,_=>Promise.reject(newError(nls.localize('cantUninstall',"Unable to uninstall the shell command '{0}'.",target))))
const{choice}=awaitthis.dialogService.show(Severity.Info,nls.localize('warnEscalationUninstall',"Code will now prompt with 'osascript' for Administrator privileges to uninstall the shell command."),buttons,{cancelId:1});
switch(choice){
case0/* OK */:
constcommand='osascript -e "do shell script \\"rm \''+this.target+'\'\\" with administrator privileges"';
promisify(cp.exec)(command,{})
.then(undefined,_=>Promise.reject(newError(nls.localize('cantUninstall',"Unable to uninstall the shell command '{0}'.",this.target))))