summaryrefslogtreecommitdiff
path: root/extension/src/activation
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-08-03 22:58:47 -0700
committerNate Sesti <sestinj@gmail.com>2023-08-03 22:58:47 -0700
commit8070ce17c6d666436df38c684f5868ee7f689422 (patch)
tree0f94ad011616e6a9c5dbd37de1ef5de5b2a7ed9e /extension/src/activation
parent0181d6236d8b74c80adb62648fd6571431cf3210 (diff)
downloadsncontinue-8070ce17c6d666436df38c684f5868ee7f689422.tar.gz
sncontinue-8070ce17c6d666436df38c684f5868ee7f689422.tar.bz2
sncontinue-8070ce17c6d666436df38c684f5868ee7f689422.zip
feat: :lipstick: nicer "continue server loading" UI
Diffstat (limited to 'extension/src/activation')
-rw-r--r--extension/src/activation/environmentSetup.ts14
1 files changed, 4 insertions, 10 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index d6fe4261..db215e11 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -82,18 +82,18 @@ export function getExtensionVersion() {
// Returns whether a server of the current version is already running
async function checkOrKillRunningServer(serverUrl: string): Promise<boolean> {
- console.log("Checking if server is old version");
const serverRunning = await checkServerRunning(serverUrl);
// Kill the server if it is running an old version
if (fs.existsSync(serverVersionPath())) {
const serverVersion = fs.readFileSync(serverVersionPath(), "utf8");
if (serverVersion === getExtensionVersion() && serverRunning) {
// The current version is already up and running, no need to continue
+ console.log("Continue server already running");
return true;
}
}
if (serverRunning) {
- console.log("Killing old server...");
+ console.log("Killing server from old version of Continue");
try {
await fkill(":65432");
} catch (e: any) {
@@ -196,16 +196,10 @@ export async function startContinuePythonServer() {
// Get name of the corresponding executable for platform
if (os.platform() === "darwin") {
// Add necessary permissions
- console.log("Setting permissions for Continue server...");
fs.chmodSync(destination, 0o7_5_5);
- const [stdout1, stderr1] = await runCommand(
- `xattr -dr com.apple.quarantine ${destination}`
- );
- console.log("stdout: ", stdout1);
- console.log("stderr: ", stderr1);
+ await runCommand(`xattr -dr com.apple.quarantine ${destination}`);
} else if (os.platform() === "linux") {
// Add necessary permissions
- console.log("Setting permissions for Continue server...");
fs.chmodSync(destination, 0o7_5_5);
}
@@ -217,7 +211,7 @@ export async function startContinuePythonServer() {
}
// Run the executable
- console.log("Starting Continue server...");
+ console.log("Starting Continue server");
const child = spawn(destination, {
detached: true,
stdio: "ignore",