From 04e8f443706e442bd0052fe05121e7a3589190de Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Tue, 21 Sep 2021 16:21:23 +0200 Subject: [PATCH] os: don't try to read executable path on baremetal Baremetal systems usually pretend to be GOOS=linux, so an extra build tag is needed here. --- src/os/executable_other.go | 2 +- src/os/executable_procfs.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/executable_other.go b/src/os/executable_other.go index 15a9f9f7..0c9974f9 100644 --- a/src/os/executable_other.go +++ b/src/os/executable_other.go @@ -1,4 +1,4 @@ -// +build !linux +// +build !linux baremetal package os diff --git a/src/os/executable_procfs.go b/src/os/executable_procfs.go index 2f9d0b63..1abe6f1a 100644 --- a/src/os/executable_procfs.go +++ b/src/os/executable_procfs.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux +// +build linux,!baremetal package os