From 51ecca8f2fb1194f63643c7198c2b10323bce9f4 Mon Sep 17 00:00:00 2001 From: June Yi Date: Sat, 3 Oct 2020 09:46:28 +0900 Subject: [PATCH] Add a comment about the behavior in Windows --- api/internal/plugins/execplugin/execplugin.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/internal/plugins/execplugin/execplugin.go b/api/internal/plugins/execplugin/execplugin.go index eff0209f9..a6f801ebb 100644 --- a/api/internal/plugins/execplugin/execplugin.go +++ b/api/internal/plugins/execplugin/execplugin.go @@ -53,6 +53,11 @@ func (p *ExecPlugin) ErrIfNotExecutable() error { } // In Windows, it is not possible to determine whether a // file is executable through file mode. + // TODO: provide for setting the executable FileMode bit on Windows + // The (fs *fileStat) Mode() (m FileMode) {} function in + // https://golang.org/src/os/types_windows.go + // lacks the ability to set the FileMode executable bit in response + // to file data on Windows. if f.Mode()&0111 == 0000 && runtime.GOOS != "windows" { return fmt.Errorf("unexecutable plugin at: %s", p.path) }