Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix non sudo enable community addon #4714

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions microk8s-resources/default-args/git/.gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[safe]
directory = /snap/microk8s/current/addons/community/.git
directory = /snap/microk8s/current/addons/core/.git
2 changes: 2 additions & 0 deletions microk8s-resources/wrappers/git.wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export GIT_EXEC_PATH="$SNAP/usr/lib/git-core"
export GIT_TEMPLATE_DIR="$SNAP/usr/share/git-core/templates"
export GIT_CONFIG_NOSYSTEM=1

HOME="${SNAP_DATA}/args/git"

"$SNAP/usr/bin/git" "${@}"
4 changes: 4 additions & 0 deletions snap/hooks/install
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,8 @@ then
touch ${SNAP_DATA}/var/lock/low-memory-guard.lock
fi

# copy git config
mkdir -p ${SNAP_DATA}/args/git
cp ${SNAP}/default-args/git/.gitconfig ${SNAP_DATA}/args/git/.gitconfig

touch "${SNAP_DATA}/var/lock/installed.lock"
Loading