Method: Licensed::Sources::Cabal#package_db_args
- Defined in:
- lib/licensed/sources/cabal.rb
#package_db_args ⇒ Object
Returns an array of ghc package DB locations as specified in the app configuration
142 143 144 145 146 147 148 149 150 151 |
# File 'lib/licensed/sources/cabal.rb', line 142 def package_db_args @package_db_args ||= Array(config.dig("cabal", "ghc_package_db")).map do |path| next "--#{path}" if %w(global user).include?(path) path = realized_ghc_package_path(path) path = File.(path, config.root) next unless File.exist?(path) "--package-db=#{path}" end.compact end |