Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
cijiugechu authored and lpil committed Aug 14, 2023
1 parent f26fed2 commit 1be5bee
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ export function activate(context: vscode.ExtensionContext) {
});

const restartCommand = vscode.commands.registerCommand(GleamCommands.RestartServer, async () => {
if(!client) {
if (!client) {
vscode.window.showErrorMessage("gleam client not found");
return
return;
}

try {
if (client.isRunning()) {
await client.restart();
if (client.isRunning()) {
await client.restart();

vscode.window.showInformationMessage("gleam server restarted.");
} else {
await client.start();
}
} catch (err) {
client.error("Restarting client failed", err, "force");
}
} else {
await client.start();
}
} catch (err) {
client.error("Restarting client failed", err, "force");
}
});

context.subscriptions.push(restartCommand);
Expand Down

0 comments on commit 1be5bee

Please sign in to comment.