diff --git a/golang/cmd/clean.sls b/golang/cmd/clean.sls index 91d9c9e..c6d807e 100644 --- a/golang/cmd/clean.sls +++ b/golang/cmd/clean.sls @@ -11,5 +11,6 @@ golang-cmd-clean-cmd-run-go-clean-{{ package }}: cmd.run: - name: go clean -i {{ package }}... - runas: {{ golang.rootuser }} + - onlyif: which go || test -f /usr/local/bin/go {%- endfor %} diff --git a/golang/cmd/goget.sls b/golang/cmd/goget.sls index e4d3647..0d45aca 100644 --- a/golang/cmd/goget.sls +++ b/golang/cmd/goget.sls @@ -10,5 +10,6 @@ golang-cmd-goget-cmd-run-go-get-{{ package }}: cmd.run: - name: go get {{ package }} - runas: {{ golang.rootuser }} + - onlyif: which go || test -f /usr/local/bin/go {%- endfor %}