carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1//go:build !linux
2
3package host
4
5import "os"
6
7// The platform self-update is a root oneshot on a Linux box; the macOS and
8// Windows builds exist only so the carlos CLI compiles for workstation use,
9// and neither has the syscalls systemapply_unix.go needs — darwin's stdlib
10// syscall package has no Openat at all. Both primitives refuse rather than
11// pretend: an apply that cannot lock, or that cannot open a path without
12// following symlinks, must do nothing at all — and Run tells this refusal
13// apart from a lock another apply is holding, so an unsupported platform is
14// an error rather than a quiet no-op.
15
16func openBeneath(root string, parts ...string) (*os.File, error) {
17 return nil, errSystemUnsupported
18}
19
20func flockExclusiveNonblock(f *os.File) error { return errSystemUnsupported }
21