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

allow to use the extension in folders that contain spaces #716

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,20 +433,20 @@ export default class Client implements ClientInterface {
// If a custom Gemfile was configured outside of the project, use that. Otherwise, prefer our custom bundle over the
// app's bundle
if (customBundleGemfile.length > 0) {
bundleGemfile = `BUNDLE_GEMFILE=${customBundleGemfile}`;
bundleGemfile = `BUNDLE_GEMFILE="${customBundleGemfile}"`;
} else if (
fs.existsSync(path.join(this.workingFolder, ".ruby-lsp", "Gemfile"))
) {
bundleGemfile = `BUNDLE_GEMFILE=${path.join(
bundleGemfile = `BUNDLE_GEMFILE="${path.join(
this.workingFolder,
".ruby-lsp",
"Gemfile",
)}`;
)}"`;
} else {
bundleGemfile = `BUNDLE_GEMFILE=${path.join(
bundleGemfile = `BUNDLE_GEMFILE="${path.join(
this.workingFolder,
"Gemfile",
)}`;
)}"`;
}

const result = await asyncExec(
Expand Down
2 changes: 1 addition & 1 deletion src/ruby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class Ruby {
);
}

this._env.BUNDLE_GEMFILE = absoluteBundlePath;
this._env.BUNDLE_GEMFILE = `"${absoluteBundlePath}"`;
}

private async readRubyVersion() {
Expand Down