Repository: gohugoio/hugo (language: go)

Issue:
snap: Allow access to SSH keys and $HOME/.cache/hugo
Access to SSH keys is required when users have configured Git to use SSH. For example:

```
[url "git@github.com:"]
  insteadOf = https://github.com/
```

See <https://discourse.gohugo.io/t/error-failed-to-load-modules/45477/>

Access to `$HOME/.cache/hugo_cache` is required in support of https://github.com/gohugoio/hugo/issues/11286.

Both require approval from the Snapcraft team:
<https://forum.snapcraft.io/t/hugo-auto-connect-ssh-keys-and-dot-cache-hugo/36123>




Discussion / hints:

Fix patch:
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 2c5fa7dc06c..71caa65c39d 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -59,6 +59,12 @@ plugs:
     interface: personal-files
     read:
       - $HOME/.config/gcloud
+  dot-cache-hugo:
+    interface: personal-files
+    write:
+      - $HOME/.cache/hugo
+  ssh-keys:
+    interface: ssh-keys
 
 environment:
   HOME: $SNAP_REAL_HOME
@@ -95,6 +101,8 @@ apps:
       - dot-aws
       - dot-azure
       - dot-config-gcloud
+      - dot-cache-hugo
+      - ssh-keys
 
 parts:
   git:


Test patch: