Skip to content

Commit 43a82d1

Browse files
committed
Preserve values within interactive configuration
1 parent 98d3874 commit 43a82d1

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

slackoverflow/application.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,30 +126,30 @@ func (so *Application) SessionRefresh() {
126126
if err != nil {
127127
Emergency(err.Error())
128128
}
129-
Ok("SQLite3 Database loaded: %s", so.databaseFile)
129+
Debug("SQLite3 Database loaded: %s", so.databaseFile)
130130

131131
// Check does the StackQuestion table exist
132132
err = so.SQLite3.VerifyTable("StackExchangeQuestion")
133133
if err != nil {
134134
Emergency("Table StackExchangeQuestion: %q", err)
135135
}
136-
Ok("Table: StackExchangeQuestion exists.")
136+
Debug("Table: StackExchangeQuestion exists.")
137137

138138
// Check does the SlackQuestion table exist
139139
err = so.SQLite3.VerifyTable("SlackQuestion")
140140
if err != nil {
141141
Emergency("Table SlackQuestion: %q", err)
142142
}
143-
Ok("Table: SlackQuestion exists.")
143+
Debug("Table: SlackQuestion exists.")
144144

145145
// Check does the StackExchangeUser table exist
146146
err = so.SQLite3.VerifyTable("StackExchangeUser")
147147
if err != nil {
148148
Emergency("Table StackExchangeUser: %q", err)
149149
}
150-
Ok("Table: StackExchangeUser exists.")
150+
Debug("Table: StackExchangeUser exists.")
151151
} else {
152-
Ok("SQLite3 Database is already loaded.")
152+
Debug("SQLite3 Database is already loaded.")
153153
}
154154

155155
// Load Stack Exchange Client

slackoverflow/config-yaml.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ func (yc *yamlContents) ConfigureSlackOverflow() {
101101
std.Hr()
102102
std.Body("Configuring Slack Overflow")
103103

104+
// Force to reload the configuration file if exists
105+
yc.IsConfigured()
106+
104107
reader := bufio.NewReader(os.Stdin)
105108
// Log level
106109

@@ -134,6 +137,9 @@ func (yc *yamlContents) ConfigureStackExchange() {
134137
std.Hr()
135138
std.Body("Configuring Stack Exchange API Client")
136139

140+
// Force to reload the configuration file if exists
141+
yc.IsConfigured()
142+
137143
reader := bufio.NewReader(os.Stdin)
138144

139145
if yc.StackExchange.SearchAdvanced == nil {
@@ -183,6 +189,9 @@ func (yc *yamlContents) ConfigureSlack() {
183189
std.Hr()
184190
std.Body("Configuring Slack API Client")
185191

192+
// Force to reload the configuration file if exists
193+
yc.IsConfigured()
194+
186195
reader := bufio.NewReader(os.Stdin)
187196

188197
// Set Slack Defaults

0 commit comments

Comments
 (0)