From a167a78ccb5bd10686d3f578da9513edbcaebf47 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Thu, 21 Jul 2016 23:17:58 +0900 Subject: [PATCH] Return when nomad syslog command has invalid number of argument --- command/syslog_plugin.go | 1 + 1 file changed, 1 insertion(+) diff --git a/command/syslog_plugin.go b/command/syslog_plugin.go index b10d6217d..3afbc39a0 100644 --- a/command/syslog_plugin.go +++ b/command/syslog_plugin.go @@ -27,6 +27,7 @@ func (s *SyslogPluginCommand) Synopsis() string { func (s *SyslogPluginCommand) Run(args []string) int { if len(args) == 0 { s.Ui.Error("log output file isn't provided") + return 1 } logFileName := args[0] stdo, err := os.OpenFile(logFileName, os.O_CREATE|os.O_RDWR|os.O_APPEND, 0666)