Find if Mac is managed (#73)
This commit is contained in:
parent
c391a28f22
commit
1fcc141ee4
1 changed files with 7 additions and 1 deletions
|
@ -89,7 +89,13 @@
|
|||
|
||||
{{- if stdinIsATTY -}}
|
||||
|
||||
{{- if not (env "WORK_ENVIRONMENT") -}}
|
||||
{{- if (eq .chezmoi.os "darwin") -}}
|
||||
{{- if (contains "managed Mac computers" (output "/usr/libexec/ApplicationFirewall/socketfilterfw" "--getglobalstate")) -}}
|
||||
{{- $work = true -}}
|
||||
{{- else }}
|
||||
{{- $work = false -}}
|
||||
{{- end -}}
|
||||
{{- else if not (env "WORK_ENVIRONMENT") -}}
|
||||
{{- $work = promptBoolOnce $data.host "work" "Work environment" $work -}}
|
||||
{{- end -}}
|
||||
{{- if not (env "RESTRICTED_ENVIRONMENT") -}}
|
||||
|
|
Loading…
Reference in a new issue