Restore command #593

Merged
konrad merged 8 commits from feature/restore into master 2020-06-21 15:30:51 +00:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit 9e96a9ee01 - Show all commits

View File

@ -103,7 +103,12 @@ func Restore(filename string) error {
_ = cfgr.Close()
_ = outFile.Close()
log.Info("Restored config file.")
log.Infof("The config file has been restored to '%s'.", configFile.Name)
log.Infof("You can now make changes to it, hit enter when you're done.")
if _, err := bufio.NewReader(os.Stdin).ReadString('\n'); err != nil {
return fmt.Errorf("could not read from stdin: %s", err)
}
log.Info("Restoring...")
// Init the configFile again since the restored configuration is most likely different from the one before
initialize.LightInit()