Skip to content

Commit 7ba92d6

Browse files
authored
fix(rdbg): ensure we always have current dir (#165)
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.
1 parent 630cc4e commit 7ba92d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ruby.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl zed::Extension for RubyExtension {
243243
command: Some(rdbg_path.to_string()),
244244
arguments,
245245
connection: Some(connection),
246-
cwd: ruby_config.cwd,
246+
cwd: ruby_config.cwd.or_else(|| Some(worktree.root_path())),
247247
envs: ruby_config.env.into_iter().collect(),
248248
request_args: StartDebuggingRequestArguments {
249249
configuration: configuration.to_string(),

0 commit comments

Comments
 (0)