Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Apply the branch flag to debug mode too
Browse files Browse the repository at this point in the history
Without this, we can't use the `--branch` flag with debug mode, which greatly
limits the use cases for it.
  • Loading branch information
st0012 committed Nov 27, 2023
1 parent dc6baee commit b8cf332
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,15 +543,17 @@ export default class Client implements ClientInterface {
options: executableOptions,
};
} else {
const argsWithBranch = branch.length > 0 ? ["--branch", branch] : [];

run = {
command: "ruby-lsp",
args: branch.length > 0 ? ["--branch", branch] : [],
args: argsWithBranch,
options: executableOptions,
};

debug = {
command: "ruby-lsp",
args: ["--debug"],
args: argsWithBranch.concat(["--debug"]),
options: executableOptions,
};
}
Expand Down

0 comments on commit b8cf332

Please sign in to comment.