From 584732f80ab91afb349720cfb8e9979ed2ba173e Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sat, 2 Nov 2024 03:03:44 +0900 Subject: cmd: shim and init into separate binaries This change also fixes a deadlock when shim fails to connect and complete the setup. Signed-off-by: Ophestra Umiker --- internal/path.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 internal/path.go (limited to 'internal/path.go') diff --git a/internal/path.go b/internal/path.go new file mode 100644 index 00000000..1332276e --- /dev/null +++ b/internal/path.go @@ -0,0 +1,14 @@ +package internal + +import "path" + +var ( + Fmain = compPoison + Fsu = compPoison + Fshim = compPoison + Finit = compPoison +) + +func Path(p string) (string, bool) { + return p, p != compPoison && p != "" && path.IsAbs(p) +} -- cgit v1.3.1