Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
fix config updater
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed May 16, 2017
1 parent 77363b8 commit ed7c2d2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 21 deletions.
1 change: 1 addition & 0 deletions .release/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Changelog
- [x] monitor logs to output important info as to why it might not start (not enough RAM etc)
- [x] add `~/.malice/logs/elastic.log` to catch ES errors
- [x] fix `plugin update --all` to only update **enabled** plugins
- [x] fix config.toml updater

Plugin list
-----------
Expand Down
2 changes: 1 addition & 1 deletion .release/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.3.3
v0.3.4
4 changes: 2 additions & 2 deletions config/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#######################################################################

title = "Malice Runtime Configuration"
version = "v0.3.2"
version = "v0.3.4"

[author]
name = "blacktop"
Expand Down Expand Up @@ -60,4 +60,3 @@ version = "v0.3.2"
enable = false
http = ""
https = ""

5 changes: 1 addition & 4 deletions config/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,12 @@ func loadFromToml(configPath, version string) {
log.Debugf("config.toml version: %s, malice version: %s", Conf.Version, version)
if version != "dev" && !strings.EqualFold(Conf.Version, version) {
// Prompt user to update malice config.toml?
log.Info("Newer version of malice config.toml available: ", version)
log.Infof("Newer version of malice config.toml available: %s, you currently have %s", version, Conf.Version)
fmt.Println("Would you like to update now? (yes/no)")
if utils.AskForConfirmation() {
log.Debug("Updating config: ", configPath)
er.CheckError(UpdateConfig())
}
log.Info("Newer version of malice config available: ", version)
log.Debug("Updating config: ", configPath)
er.CheckError(UpdateConfig())
}
}

Expand Down
24 changes: 12 additions & 12 deletions plugins/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed7c2d2

Please sign in to comment.