language_module_dependency: fix finding opam.

`opam list <package>` only checks if the package is available

Closes Homebrew/homebrew#35209.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Jaime Marquínez Ferrándiz 2014-12-23 10:49:06 +01:00 committed by Mike McQuaid
parent 62addcfce8
commit a0b36563ea

View File

@ -25,7 +25,7 @@ class LanguageModuleDependency < Requirement
when :jruby then %W{/usr/bin/env jruby -rubygems -e require\ '#{@import_name}'}
when :lua then %W{/usr/bin/env luarocks show #{@import_name}}
when :node then %W{/usr/bin/env node -e require('#{@import_name}');}
when :ocaml then %W{/usr/bin/env opam list #{@import_name}}
when :ocaml then %W{/usr/bin/env opam list --installed #{@import_name}}
when :perl then %W{/usr/bin/env perl -e use\ #{@import_name}}
when :python then %W{/usr/bin/env python -c import\ #{@import_name}}
when :python3 then %W{/usr/bin/env python3 -c import\ #{@import_name}}