Is there an existing issue for this?
Current Behavior
When running tests, the code attempts to create directories at /home/updatecli, which fails on macOS with the error:
time="2026-01-29T21:26:55+02:00" level=error msg="err - mkdir /home/updatecli: operation not supported"
This error occurs multiple times (7 times in the provided logs) because:
- Multiple test cases specify
Directory: "/home/updatecli" (see main_test.go line 34 and other test cases)
- The
setDirectory() function in main.go (lines 458-466) attempts to create this directory using os.MkdirAll()
- On macOS,
/home doesn't exist (macOS uses /Users instead), and creating directories in non-existent parent paths fails with "operation not supported"
Code Location:
pkg/plugins/scms/github/main.go:458-466 - setDirectory() function
pkg/plugins/scms/github/main_test.go:34 - Multiple test cases with hardcoded /home/updatecli path
Expected Behavior
- Tests should use platform-agnostic temporary directories or paths that exist on all platforms
- The
setDirectory() function should handle directory creation gracefully, or tests should use paths that are valid on the test platform
- On macOS, tests should use
/tmp or a user-writable directory instead of /home/updatecli
- Directory creation should succeed without errors on all supported platforms (Linux, macOS, Windows)
Steps To Reproduce
-
Run the GitHub SCM plugin tests:
cd /Users/josill/Desktop/Projects/updatecli
go test ./pkg/plugins/scms/github -v
-
Observe the errors:
- Multiple
mkdir /home/updatecli: operation not supported error messages appear in the logs
Environment
### Environment
- **OS**: macOS (Darwin 24.6.0, ARM64)
- **Go Version**: go1.25.5 darwin/arm64
- **Test Command**: `go test ./pkg/plugins/scms/github`
Pipeline Graph
No response
Anything else?
No response
Is there an existing issue for this?
Current Behavior
When running tests, the code attempts to create directories at
/home/updatecli, which fails on macOS with the error:This error occurs multiple times (7 times in the provided logs) because:
Directory: "/home/updatecli"(seemain_test.goline 34 and other test cases)setDirectory()function inmain.go(lines 458-466) attempts to create this directory usingos.MkdirAll()/homedoesn't exist (macOS uses/Usersinstead), and creating directories in non-existent parent paths fails with "operation not supported"Code Location:
pkg/plugins/scms/github/main.go:458-466-setDirectory()functionpkg/plugins/scms/github/main_test.go:34- Multiple test cases with hardcoded/home/updateclipathExpected Behavior
setDirectory()function should handle directory creation gracefully, or tests should use paths that are valid on the test platform/tmpor a user-writable directory instead of/home/updatecliSteps To Reproduce
Run the GitHub SCM plugin tests:
Observe the errors:
mkdir /home/updatecli: operation not supportederror messages appear in the logsEnvironment
Pipeline Graph
No response
Anything else?
No response