mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Fixing github build
This commit is contained in:
@@ -91,3 +91,13 @@ func configureEncoder(format yqlib.PrinterOutputFormat) yqlib.Encoder {
|
||||
}
|
||||
panic("invalid encoder")
|
||||
}
|
||||
|
||||
// this is a hack to enable backwards compatibility with githubactions (which pipe /dev/null into everything)
|
||||
// and being able to call yq with the filename as a single parameter
|
||||
//
|
||||
// without this - yq detects there is stdin (thanks githubactions),
|
||||
// then tries to parse the filename as an expression
|
||||
func maybeFile(str string) bool {
|
||||
_, err := os.Stat(str) // #nosec
|
||||
return err == nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user