diff options
author | Alex Auvolat <alex@adnab.me> | 2022-11-28 18:08:02 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-11-28 18:08:02 +0100 |
commit | cbde799457a8470cd64a09d10827577d005ca6f8 (patch) | |
tree | 04a6b7c445b6eb97c422a0ee1800fdfb8b73b8bc /executor | |
parent | bf3165a7069fc6dcf9ae3a28be3af07fe8b4e1c2 (diff) | |
download | nomad-driver-nix2-cbde799457a8470cd64a09d10827577d005ca6f8.tar.gz nomad-driver-nix2-cbde799457a8470cd64a09d10827577d005ca6f8.zip |
Make symlinks work
Diffstat (limited to 'executor')
-rw-r--r-- | executor/executor_linux.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 |