Skip to content

Commit

Permalink
Fixed error launching Kaga without kaga.json, fixes #37
Browse files Browse the repository at this point in the history
  • Loading branch information
waicool20 committed Jun 20, 2017
1 parent 7b26564 commit 5a60b02
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ class KancolleAutoProfile(
}
} else {
loaderLogger.debug("Config at $path not found, falling back to config.ini in kancolle-auto root")
return load()
if (Kaga.CONFIG.isValid()) {
return load()
} else {
throw Exception("No valid kancolle-auto root, couldn't read config.ini")
}
}
}
}
Expand Down Expand Up @@ -370,5 +374,6 @@ class KancolleAutoProfile(
@get:JsonProperty var checkSchedule by checkScheduleProperty
}


override fun toString(): String = ObjectMapper().writeValueAsString(this)
}

0 comments on commit 5a60b02

Please sign in to comment.