Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/bsk/ipc-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ export class BskIpcClient {

async resolveSocket({ isAborted = () => false } = {}) {
if (this.#sockPath) return this.#sockPath;
if (process.platform === "win32") {
throw new BskRpcError("unsupported", "Windows named-pipe discovery is not implemented; pass { sockPath: '\\\\\\\\.\\\\pipe\\\\...' } explicitly");
}
const found = readDaemonInfo(this.#home);
if (found) return found.sock_path;
if (!this.#autoStart) {
Expand Down
5 changes: 4 additions & 1 deletion test/fixtures/fake-bsk-daemon.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import path from "node:path";
export async function startFakeBskDaemon({ handlers = {}, delayMs = 0 } = {}) {
const home = mkdtempSync(path.join(tmpdir(), "fake-bsk-home-"));
mkdirSync(path.join(home, "run"));
const sockPath = path.join(home, "run", "daemon.sock");
// The real daemon publishes a named pipe on Windows, where a socket file under tmpdir cannot be listened on.
const sockPath = process.platform === "win32"
? "\\\\.\\pipe\\" + path.basename(home)
: path.join(home, "run", "daemon.sock");
const requests = [];
const sockets = new Set();

Expand Down
Loading