diff --git a/Formula/gitops-ee.rb b/Formula/gitops-ee.rb index c6fec97..45e9d30 100644 --- a/Formula/gitops-ee.rb +++ b/Formula/gitops-ee.rb @@ -15,11 +15,11 @@ class GitopsEe < Formula def install bin.install "gitops" # Install bash completion - output = Utils.popen_read("#{bin}/gitops completion bash") + output = Utils.safe_popen_read({ "SHELL" => "bash" }, "#{bin}/gitops completion bash", err: :err) (bash_completion/"gitops").write output # Install zsh completion - output = Utils.popen_read("#{bin}/gitops completion zsh") + output = Utils.safe_popen_read({ "SHELL" => "zsh" }, "#{bin}/gitops completion zsh", err: :err) (zsh_completion/"_gitops").write output end end @@ -30,11 +30,11 @@ def install def install bin.install "gitops" # Install bash completion - output = Utils.popen_read("#{bin}/gitops completion bash") + output = Utils.safe_popen_read({ "SHELL" => "bash" }, "#{bin}/gitops completion bash", err: :err) (bash_completion/"gitops").write output # Install zsh completion - output = Utils.popen_read("#{bin}/gitops completion zsh") + output = Utils.safe_popen_read({ "SHELL" => "zsh" }, "#{bin}/gitops completion zsh", err: :err) (zsh_completion/"_gitops").write output end end @@ -48,11 +48,11 @@ def install def install bin.install "gitops" # Install bash completion - output = Utils.popen_read("#{bin}/gitops completion bash") + output = Utils.safe_popen_read({ "SHELL" => "bash" }, "#{bin}/gitops completion bash", err: :err) (bash_completion/"gitops").write output # Install zsh completion - output = Utils.popen_read("#{bin}/gitops completion zsh") + output = Utils.safe_popen_read({ "SHELL" => "zsh" }, "#{bin}/gitops completion zsh", err: :err) (zsh_completion/"_gitops").write output end end @@ -63,11 +63,11 @@ def install def install bin.install "gitops" # Install bash completion - output = Utils.popen_read("#{bin}/gitops completion bash") + output = Utils.safe_popen_read({ "SHELL" => "bash" }, "#{bin}/gitops completion bash", err: :err) (bash_completion/"gitops").write output # Install zsh completion - output = Utils.popen_read("#{bin}/gitops completion zsh") + output = Utils.safe_popen_read({ "SHELL" => "zsh" }, "#{bin}/gitops completion zsh", err: :err) (zsh_completion/"_gitops").write output end end