Skip to content

Commit

Permalink
Snap: Add {system,user}-gitconfig plugs to read gitconfig (#9619)
Browse files Browse the repository at this point in the history
* Add system-gitconfig plug to read /etc/gitconfig
* Add user-gitconfig plug to read user-specific gitconfig file(s)
* Add app environment setting to set $HOME as $SNAP_REAL_HOME
  • Loading branch information
ifurther authored Apr 1, 2022
1 parent db1562e commit 2a231b0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,29 @@ package-repositories:
key-id: 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280
url: https://deb.nodesource.com/node_16.x

plugs:
system-gitconfig:
interface: system-files
read:
- /etc/gitconfig
user-gitconfig:
interface: personal-files
read:
- $HOME/.gitconfig
- $HOME/.config/git/config

apps:
hugo:
environment:
HOME: $SNAP_REAL_HOME
command: bin/hugo
completer: hugo-completion
plugs:
- home
- network-bind
- removable-media
- system-gitconfig
- user-gitconfig

parts:
git:
Expand Down

0 comments on commit 2a231b0

Please sign in to comment.