From cbde799457a8470cd64a09d10827577d005ca6f8 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 28 Nov 2022 18:08:02 +0100 Subject: Make symlinks work --- executor/executor_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'executor') diff --git a/executor/executor_linux.go b/executor/executor_linux.go index 4ab8367..8665fd0 100644 --- a/executor/executor_linux.go +++ b/executor/executor_linux.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "io" + "io/fs" "os" "os/exec" "path" @@ -913,7 +914,7 @@ func filepathIsRegular(path string) error { if err != nil { return err } - if !f.Mode().Type().IsRegular() { + if !(f.Mode().Type().IsRegular() || f.Mode().Type() & fs.ModeType == fs.ModeSymlink) { return fmt.Errorf("path was not a regular file") } return nil -- cgit v1.2.3