Browse Source

cli: demote version mismatch to warning for now (#35548)

Simon Klee 1 month ago
parent
commit
41d11a8a89
2 changed files with 3 additions and 3 deletions
  1. 2 2
      packages/cli/src/daemon.ts
  2. 1 1
      packages/cli/test/mini.test.ts

+ 2 - 2
packages/cli/src/daemon.ts

@@ -31,8 +31,8 @@ const attach = Effect.fn("cli.daemon.attach")(function* (options: AttachOptions)
     catch: (cause) => attachError(options, cause),
   })
   if (health.version !== InstallationVersion)
-    return yield* Effect.fail(
-      new Error(`Server at ${options.url} has version ${health.version}; this client requires ${InstallationVersion}`),
+    process.stderr.write(
+      `Warning: Server at ${options.url} has version ${health.version}; this client is ${InstallationVersion}. Continuing anyway.\n`,
     )
   return transport
 })

+ 1 - 1
packages/cli/test/mini.test.ts

@@ -116,7 +116,7 @@ describe("mini command", () => {
       expect(JSON.parse(result.stdout)).toMatchObject({
         type: "error",
         sessionID: "",
-        error: { type: "unknown", message: expect.stringContaining("requires") },
+        error: { type: "unknown", message: "Failed to resolve server directory" },
       })
     } finally {
       server.stop(true)