From c5b9e03f87be8cf17a61be78bf07b1dd1504397c Mon Sep 17 00:00:00 2001 From: vyfor Date: Mon, 2 Dec 2024 20:28:46 +0500 Subject: [PATCH] refactor: use os-specific defaults --- src/cli/args.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cli/args.rs b/src/cli/args.rs index d834b379..61b9f023 100644 --- a/src/cli/args.rs +++ b/src/cli/args.rs @@ -3,7 +3,10 @@ use std::env; use super::error::CliError; const DEFAULT_TIMEOUT: u64 = 60000; -const DEFAULT_PIPE_NAME: &str = "cord-ipc"; +#[cfg(target_os = "windows")] +const DEFAULT_PIPE_NAME: &str = "\\\\.\\pipe\\cord-ipc"; +#[cfg(target_os = "linux")] +const DEFAULT_PIPE_NAME: &str = "/tmp/cord-ipc"; #[derive(Debug)] pub struct Args {