Output a better error when pkg-config is not found - close #169

This commit is contained in:
josh committed 2023-09-08 21:05:01 -04:00
1 parent b490daa480
commit a7b962c11a
3 files changed
+18 -1

No files matched your search

+6 -1
View File
@@ -125,7 +125,12 @@ module Rscons
elsif program = options[:program]
Ansi.write($stdout, "Checking '", :cyan, program, :reset, "'... ")
end
program ||= "pkg-config"
unless program
program = "pkg-config"
unless Util.find_executable(program)
raise RsconsError.new("Error: executable '#{program}' not found")
end
end
args = options[:args] || %w[--cflags --libs]
command = [program, *args, package].compact
stdout, _, status = log_and_test_command(command)