Skip to content

Commit

Permalink
Clean output
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmorganson committed Oct 27, 2024
1 parent 2966e01 commit a0eb055
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions home/dot_profile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ LS_COLORS={{ output "pkgx" "vivid" "--color-mode" "8-bit" "generate" "one-dark"

# GitHub
{{- $output := output "sh" "-c" "pkgx gh api https://api.github.com/user 2>/dev/null || true" -}}
{{- if $output }}
{{- if $output -}}
{{- with (fromJson $output) -}}
{{- if and (index . "login") (index . "name") (index . "id") }}
{{- if and (index . "id") (index . "name") (index . "login") -}}
GITHUB_USER={{ .login | quote }}
GIT_AUTHOR_NAME={{ .name | quote }}
GIT_AUTHOR_EMAIL={{ printf "%v+%[email protected]" .id .login | quote }}
GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
{{- end }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}

# Bash
BASH_SILENCE_DEPRECATION_WARNING=1
Expand Down

0 comments on commit a0eb055

Please sign in to comment.