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

Avoid using --disable-gems #710

Merged
merged 1 commit into from
Jul 19, 2023
Merged
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
5 changes: 2 additions & 3 deletions src/ruby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ export class Ruby {

private async activate(ruby: string) {
let command = this.shell ? `${this.shell} -ic ` : "";
// eslint-disable-next-line max-len
command += `'${ruby} --disable-gems -rjson -e "printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, JSON.dump(ENV.to_h))"'`;
command += `'${ruby} -rjson -e "printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, JSON.dump(ENV.to_h))"'`;

const result = await asyncExec(command, { cwd: this.workingFolder });

Expand All @@ -153,7 +152,7 @@ export class Ruby {

private async fetchRubyInfo() {
const rubyInfo = await asyncExec(
"ruby --disable-gems -e 'puts \"#{RUBY_VERSION},#{defined?(RubyVM::YJIT)}\"'",
"ruby -e 'puts \"#{RUBY_VERSION},#{defined?(RubyVM::YJIT)}\"'",
{ env: this._env },
);

Expand Down