Fix -debug command line option misbehaviour: forbid stdin redirection to a pipe when run as plugin server
This commit is contained in:
parent
a84f4fffae
commit
9674a30227
5
main.go
5
main.go
|
@ -112,7 +112,10 @@ func wrappedMain() int {
|
|||
log.Printf("Built with Go Version: %s", runtime.Version())
|
||||
|
||||
// Prepare stdin for plugin usage by switching it to a pipe
|
||||
setupStdin()
|
||||
// But do not switch to pipe in plugin
|
||||
if os.Getenv(plugin.MagicCookieKey) != plugin.MagicCookieValue {
|
||||
setupStdin()
|
||||
}
|
||||
|
||||
config, err := loadConfig()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue