Skip to content

Commit

Permalink
vscode_extension_installer: do case-insensitive matching to check if …
Browse files Browse the repository at this point in the history
…an extension is already installed
  • Loading branch information
vraravam committed Feb 9, 2024
1 parent af668bc commit 101c7ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/bundle/vscode_extension_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def install(name, preinstall: true, no_upgrade: false, verbose: false, force: fa
end

def extension_installed?(name)
installed_extensions.include? name
installed_extensions.include? name.downcase
end

def installed_extensions
Expand Down
4 changes: 2 additions & 2 deletions spec/bundle/vscode_extension_installer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
allow(described_class).to receive(:installed_extensions).and_return(["foo"])
end

it "skips" do
it "skips ignoring case" do
expect(Bundle).not_to receive(:system)
expect(described_class.preinstall("foo")).to be(false)
expect(described_class.preinstall("Foo")).to be(false)
end
end

Expand Down

0 comments on commit 101c7ee

Please sign in to comment.