Skip to content
Open
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
9 changes: 2 additions & 7 deletions vscode/src/ruby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class Ruby implements RubyInterface {
.getConfiguration("rubyLsp")
.get<ManagerConfiguration>("rubyVersionManager")!;

private readonly shell = process.env.SHELL?.replace(/(\s+)/g, "\\$1");
private _env: NodeJS.ProcessEnv = {};
private _error = false;
private readonly context: vscode.ExtensionContext;
Expand Down Expand Up @@ -402,12 +401,8 @@ export class Ruby implements RubyInterface {

private async toolExists(tool: string) {
try {
let command = this.shell ? `${this.shell} -i -c '` : "";
command += `${tool} --version`;

if (this.shell) {
command += "'";
}
const shell = vscode.env.shell.replace(/(\s+)/g, "\\$1");
const command = `${shell} -i -c '${tool} --version'`;

this.outputChannel.info(`Checking if ${tool} is available on the path with command: ${command}`);

Expand Down