mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-09-15 12:18:57 +00:00
Support exec plugin on Windows
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/google/shlex"
|
"github.com/google/shlex"
|
||||||
@@ -50,7 +51,9 @@ func (p *ExecPlugin) ErrIfNotExecutable() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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 fmt.Errorf("unexecutable plugin at: %s", p.path)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user