File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -585,10 +585,10 @@ function buildInstallCommand(
585585 const downloadUrl = `https://github.com/${ spec . repo } /releases/latest/download/$ASSET` ;
586586
587587 if ( spec . archiveType === "binary" ) {
588- return `apk add --no-cache curl && ARCH="$(uname -m)" && case "$ARCH" in\n${ caseLines } \n\t*) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;;\nesac && TMP_DIR="$(mktemp -d)" && cleanup() { rm -rf "$TMP_DIR"; } && trap cleanup EXIT && curl -fsSL ${ quoteArg ( downloadUrl ) } -o ${ archivePath } && install -Dm755 ${ archivePath } ${ installTarget } ` ;
588+ return `apk add --no-cache curl && ARCH="$(uname -m)" && case "$ARCH" in\n${ caseLines } \n\t*) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;;\nesac && TMP_DIR="$(mktemp -d)" && cleanup() { rm -rf "$TMP_DIR"; } && trap cleanup EXIT && curl -fsSL " ${ downloadUrl } " -o ${ archivePath } && install -Dm755 ${ archivePath } ${ installTarget } ` ;
589589 }
590590
591- return `apk add --no-cache curl unzip && ARCH="$(uname -m)" && case "$ARCH" in\n${ caseLines } \n\t*) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;;\nesac && TMP_DIR="$(mktemp -d)" && cleanup() { rm -rf "$TMP_DIR"; } && trap cleanup EXIT && curl -fsSL ${ quoteArg ( downloadUrl ) } -o ${ archivePath } && unzip -oq ${ archivePath } -d "$TMP_DIR" && install -Dm755 "$TMP_DIR"/${ extractedFile } ${ installTarget } ` ;
591+ return `apk add --no-cache curl unzip && ARCH="$(uname -m)" && case "$ARCH" in\n${ caseLines } \n\t*) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;;\nesac && TMP_DIR="$(mktemp -d)" && cleanup() { rm -rf "$TMP_DIR"; } && trap cleanup EXIT && curl -fsSL " ${ downloadUrl } " -o ${ archivePath } && unzip -oq ${ archivePath } -d "$TMP_DIR" && install -Dm755 "$TMP_DIR"/${ extractedFile } ${ installTarget } ` ;
592592 }
593593 case "manual" :
594594 return null ;
@@ -749,6 +749,9 @@ async function ensureInstalled(server: LspServerDefinition): Promise<boolean> {
749749 if ( status === STATUS_PRESENT ) {
750750 return true ;
751751 }
752+ if ( status === STATUS_DECLINED ) {
753+ return false ;
754+ }
752755 checkedCommands . delete ( cacheKey ) ;
753756 }
754757
@@ -890,6 +893,10 @@ export async function uninstallServer(
890893 resetInstallState ( server . id ) ;
891894 stopManagedServer ( server . id ) ;
892895 return true ;
896+ } catch ( error ) {
897+ console . error ( `Failed to uninstall ${ server . id } ` , error ) ;
898+ toast ( strings ?. error ?? "Error" ) ;
899+ throw error ;
893900 } finally {
894901 loadingDialog ?. destroy ( ) ;
895902 }
Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ export default function lspServerDetail(serverId) {
449449 ) {
450450 break ;
451451 }
452- await uninstallServer ( snapshot . merged ) ;
452+ await uninstallServer ( snapshot . merged , { promptConfirm : false } ) ;
453453 toast ( "Server uninstalled" ) ;
454454 break ;
455455
You can’t perform that action at this time.
0 commit comments