From c2cbbb71d815ece5b8b84529422a13cde4541142 Mon Sep 17 00:00:00 2001 From: Vitaly Slobodin Date: Sat, 23 Aug 2025 13:16:08 +0200 Subject: [PATCH] fix(rdbg): ensure we always have current dir The debug gem requires the current directory to be present, so if the debug configuration does not include it, set it to the worktree root path. --- src/ruby.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby.rs b/src/ruby.rs index fbb43e3..e56d9d7 100644 --- a/src/ruby.rs +++ b/src/ruby.rs @@ -243,7 +243,7 @@ impl zed::Extension for RubyExtension { command: Some(rdbg_path.to_string()), arguments, connection: Some(connection), - cwd: ruby_config.cwd, + cwd: ruby_config.cwd.or_else(|| Some(worktree.root_path())), envs: ruby_config.env.into_iter().collect(), request_args: StartDebuggingRequestArguments { configuration: configuration.to_string(),