Class: XCCache::SPM::Package::Proxy::Executable
- Inherits:
-
Object
- Object
- XCCache::SPM::Package::Proxy::Executable
- Defined in:
- lib/xccache/spm/pkg/proxy_executable.rb
Constant Summary collapse
- REPO_URL =
"https://github.com/trinhngocthuyen/xccache-proxy".freeze
- VERSION_OR_SHA =
"1.0.0".freeze
Instance Method Summary collapse
Instance Method Details
#bin_path ⇒ Object
16 17 18 |
# File 'lib/xccache/spm/pkg/proxy_executable.rb', line 16 def bin_path @bin_path ||= lookup end |
#run(cmd) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/xccache/spm/pkg/proxy_executable.rb', line 9 def run(cmd) env = { "FORCE_OUTPUT" => "console", "FORCE_COLOR" => "1" } if Config.instance.ansi? cmd = cmd.is_a?(Array) ? [bin_path.to_s] + cmd : [bin_path.to_s, cmd] cmd << "--verbose" if Config.instance.verbose? Sh.run(cmd, env: env) end |