Skip to content

fix: add git to devbox packages to prevent init_hook failure on macOS - #33

Open
lucastvms wants to merge 1 commit into
sidpalas:mainfrom
lucastvms:fix/devbox-git-dependency
Open

fix: add git to devbox packages to prevent init_hook failure on macOS#33
lucastvms wants to merge 1 commit into
sidpalas:mainfrom
lucastvms:fix/devbox-git-dependency

Conversation

@lucastvms

Copy link
Copy Markdown

Added git to devbox.json to fix a failure in the init_hook. (devbox add git)

The issue:

Without git in the devbox environment, git rev-parse --show-toplevel fails, causing $GOBIN to default to /bin. On macOS, writing to /bin is forbidden (SIP), resulting in an operation not permitted error during the go install step.

Proof of Fix:

# Error before fix:
error: tool 'git' not found
sigs.k8s.io/cloud-provider-kind: copying ... exe/a.out: open /bin/cloud-provider-kind: operation not permitted

# Success after 'devbox add git':
lucas@MacBook-Pro-de-Lucas devops-directive-kubernetes-course % devbox shell
Info: Ensuring packages are installed.
✓ Computed the Devbox environment.
Starting a devbox shell...
(devbox) lucas@MacBook-Pro-de-Lucas devops-directive-kubernetes-course % 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant