summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFurther <[email protected]>2022-04-01 16:52:39 +0800
committerGitHub <[email protected]>2022-04-01 02:52:39 -0600
commit2a231b0b57a8bea20554eb7d22511de66a656769 (patch)
treeb8219028f708ac730b6c84d63a1137f4eaa2413d
parentdb1562e134fc4182cfd063058e9ecd0316a0d906 (diff)
downloadhugo-2a231b0b57a8bea20554eb7d22511de66a656769.tar.gz
hugo-2a231b0b57a8bea20554eb7d22511de66a656769.zip
Snap: Add {system,user}-gitconfig plugs to read gitconfig (#9619)
* 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
-rw-r--r--snap/snapcraft.yaml15
1 files changed, 15 insertions, 0 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 9953190f6..32ce2553c 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -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: