File tree 1 file changed +3
-7
lines changed 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -188,11 +188,6 @@ func loop() {
188
188
log .SetLevel (log .InfoLevel )
189
189
log .SetOutput (os .Stdout )
190
190
191
- // the important folders of the agent
192
- src , _ := os .Executable ()
193
- srcPath := paths .New (src ) // The path of the agent's binary
194
- srcDir := srcPath .Parent () // The directory of the agent's binary
195
-
196
191
// Instantiate Tools
197
192
Tools = tools.Tools {
198
193
Directory : getDataDir ().String (),
@@ -221,8 +216,9 @@ func loop() {
221
216
configPath = defaultConfigPath
222
217
log .Infof ("using config from default: %s" , configPath )
223
218
} else {
224
- // take the config from the old folder where the agent's binary sits
225
- oldConfigPath := srcDir .Join ("config.ini" )
219
+ // Fall back to the old config.ini location
220
+ src , _ := os .Executable ()
221
+ oldConfigPath := paths .New (src ).Parent ().Join ("config.ini" )
226
222
if oldConfigPath .Exist () {
227
223
err := oldConfigPath .CopyTo (defaultConfigPath )
228
224
if err != nil {
You can’t perform that action at this time.
0 commit comments