Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added message when no configuration files are loaded #553

Merged
merged 1 commit into from
Dec 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions command/agent/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ type Command struct {
Ui cli.Ui
ShutdownCh <-chan struct{}

args []string
agent *Agent
httpServer *HTTPServer
logFilter *logutils.LevelFilter
logOutput io.Writer
args []string
agent *Agent
httpServer *HTTPServer
logFilter *logutils.LevelFilter
logOutput io.Writer
retryJoinErrCh chan struct{}

scadaProvider *scada.Provider
Expand Down Expand Up @@ -356,7 +356,11 @@ func (c *Command) Run(args []string) int {
}

// Log config files
c.Ui.Info(fmt.Sprintf("Loaded configuration from %s", strings.Join(config.Files, ", ")))
if len(config.Files) > 1 {
c.Ui.Info(fmt.Sprintf("Loaded configuration from %s", strings.Join(config.Files, ", ")))
} else {
c.Ui.Info("No configuration files loaded")
}

// Initialize the telemetry
if err := c.setupTelementry(config); err != nil {
Expand Down