From 67f1a6c845ebc1f6a3df0950f857c09228614ab4 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Wed, 3 Jun 2026 08:11:53 +0000 Subject: [PATCH] fix: add -buildvcs=false to go build to prevent VCS errors - .git directory may have ownership issues after sudo operations - -buildvcs=false disables VCS stamping without affecting the binary --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 0fe5208..3ac7a1a 100755 --- a/install.sh +++ b/install.sh @@ -96,7 +96,7 @@ if [ "${1:-}" = "-update" ]; then export GOPATH="${INSTALL_DIR}/.go" export GOCACHE="${INSTALL_DIR}/.go/build" mkdir -p "${GOMODCACHE}" "${GOCACHE}" 2>/dev/null || sudo_if mkdir -p "${GOMODCACHE}" "${GOCACHE}" - CGO_ENABLED=0 go build -ldflags="-s -w" -o app . + CGO_ENABLED=0 go build -buildvcs=false -ldflags="-s -w" -o app . else warn "Go not found — downloading pre-built binary..." TAG=$(curl -fsSL https://git.lohmar.co.uk/api/v1/repos/cclohmar/ReceiptNext/releases/latest \ @@ -201,7 +201,7 @@ if command -v go &>/dev/null; then export GOPATH="${INSTALL_DIR}/.go" export GOCACHE="${INSTALL_DIR}/.go/build" mkdir -p "${GOMODCACHE}" "${GOCACHE}" 2>/dev/null || sudo_if mkdir -p "${GOMODCACHE}" "${GOCACHE}" - CGO_ENABLED=0 go build -ldflags="-s -w" -o app . + CGO_ENABLED=0 go build -buildvcs=false -ldflags="-s -w" -o app . else info "Go not found — downloading pre-built binary..." TAG=$(curl -fsSL https://git.lohmar.co.uk/api/v1/repos/cclohmar/ReceiptNext/releases/latest \