Skip to content

Commit

Permalink
v1.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
vushu committed Aug 3, 2023
1 parent c2b4bd8 commit 0c94f53
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coc-dlang",
"version": "1.1.7",
"version": "1.1.8",
"description": "dlang support for coc",
"author": "Dan Vu <[email protected]>",
"license": "MIT",
Expand Down
35 changes: 17 additions & 18 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ function createDownloadConfig(remoteFilename: string) {
switch (process.platform) {
case 'win32':
file = 'windows-x86_64'
extractCommand = `unzip ${remoteFilename}*.zip`;
break;
extractCommand = `unzip ${remoteFilename}*.zip`;
break;
case 'darwin':
file = 'osx-x86_64'
break;
break;
default:
//Is linux
break;
Expand Down Expand Up @@ -80,7 +80,7 @@ async function downloadFromGithub(downloadConfig : any, commando : string): Prom
}
).catch(err =>
window.showErrorMessage(err.message)
);
);
}

export async function buildFromRepository(data): Promise<boolean | undefined> {
Expand All @@ -103,12 +103,12 @@ export async function buildFromRepository(data): Promise<boolean | undefined> {
).catch(err => {
window.showErrorMessage(err.message)
}
);
if (success) {
return buildServed();
}
);
if (success) {
return buildServed();
}

return false;
return false;
}

async function buildServed(): Promise<boolean | undefined> {
Expand Down Expand Up @@ -141,16 +141,15 @@ async function moveServed(): Promise<boolean | undefined> {
}

export async function cleanupExtensionFolder(): Promise<boolean | undefined> {
window.showQuickpick(['No', 'Yes'], 'Delete all in coc-dlang-data?').then(chosen => {
return window.showQuickpick(['No', 'Yes'], 'Delete all in coc-dlang-data?').then(chosen => {
if (chosen === 0) {
return;
return true;
}
});

const commando = `rm -rf ${extensionsFolder}/*`;
const execPromise = util.promisify(exec);
return execPromise(commando).then(() => {
window.showNotification({ content: 'Successfully deleted all files in coc-dlang-data!', title: "" })
return true;
const commando = `rm -rf ${extensionsFolder}/*`;
const execPromise = util.promisify(exec);
return execPromise(commando).then(() => {
window.showNotification({ content: 'Successfully deleted all files in coc-dlang-data!', title: "" })
return true;
});
});
}

0 comments on commit 0c94f53

Please sign in to comment.