mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-22 06:47:00 +00:00
Support exec plugin on Windows
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/google/shlex"
|
||||
@@ -50,7 +51,9 @@ func (p *ExecPlugin) ErrIfNotExecutable() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if f.Mode()&0111 == 0000 {
|
||||
// In Windows, it is not possible to determine whether a
|
||||
// file is executable through file mode.
|
||||
if f.Mode()&0111 == 0000 && runtime.GOOS != "windows" {
|
||||
return fmt.Errorf("unexecutable plugin at: %s", p.path)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user