Skip to content

Commit

Permalink
Merge pull request #553 from hashicorp/b-no-configs
Browse files Browse the repository at this point in the history
Added message when no configuration files are loaded
  • Loading branch information
cbednarski committed Dec 9, 2015
2 parents 2e3fd73 + 436d223 commit 953910a
Showing 1 changed file with 10 additions and 6 deletions.
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

0 comments on commit 953910a

Please sign in to comment.