@@ -15,11 +15,11 @@ class GitopsEe < Formula
1515 def install
1616 bin . install "gitops"
1717 # Install bash completion
18- output = Utils . popen_read ( " #{ bin } /gitops completion bash")
18+ output = Utils . safe_popen_read ( { "SHELL" => "bash" } , " #{ bin } /gitops completion bash", err : :err )
1919 ( bash_completion /"gitops" ) . write output
2020
2121 # Install zsh completion
22- output = Utils . popen_read ( " #{ bin } /gitops completion zsh")
22+ output = Utils . safe_popen_read ( { "SHELL" => "zsh" } , " #{ bin } /gitops completion zsh", err : :err )
2323 ( zsh_completion /"_gitops" ) . write output
2424 end
2525 end
@@ -30,11 +30,11 @@ def install
3030 def install
3131 bin . install "gitops"
3232 # Install bash completion
33- output = Utils . popen_read ( " #{ bin } /gitops completion bash")
33+ output = Utils . safe_popen_read ( { "SHELL" => "bash" } , " #{ bin } /gitops completion bash", err : :err )
3434 ( bash_completion /"gitops" ) . write output
3535
3636 # Install zsh completion
37- output = Utils . popen_read ( " #{ bin } /gitops completion zsh")
37+ output = Utils . safe_popen_read ( { "SHELL" => "zsh" } , " #{ bin } /gitops completion zsh", err : :err )
3838 ( zsh_completion /"_gitops" ) . write output
3939 end
4040 end
@@ -48,11 +48,11 @@ def install
4848 def install
4949 bin . install "gitops"
5050 # Install bash completion
51- output = Utils . popen_read ( " #{ bin } /gitops completion bash")
51+ output = Utils . safe_popen_read ( { "SHELL" => "bash" } , " #{ bin } /gitops completion bash", err : :err )
5252 ( bash_completion /"gitops" ) . write output
5353
5454 # Install zsh completion
55- output = Utils . popen_read ( " #{ bin } /gitops completion zsh")
55+ output = Utils . safe_popen_read ( { "SHELL" => "zsh" } , " #{ bin } /gitops completion zsh", err : :err )
5656 ( zsh_completion /"_gitops" ) . write output
5757 end
5858 end
@@ -63,11 +63,11 @@ def install
6363 def install
6464 bin . install "gitops"
6565 # Install bash completion
66- output = Utils . popen_read ( " #{ bin } /gitops completion bash")
66+ output = Utils . safe_popen_read ( { "SHELL" => "bash" } , " #{ bin } /gitops completion bash", err : :err )
6767 ( bash_completion /"gitops" ) . write output
6868
6969 # Install zsh completion
70- output = Utils . popen_read ( " #{ bin } /gitops completion zsh")
70+ output = Utils . safe_popen_read ( { "SHELL" => "zsh" } , " #{ bin } /gitops completion zsh", err : :err )
7171 ( zsh_completion /"_gitops" ) . write output
7272 end
7373 end
0 commit comments