Skip to content

Commit

Permalink
docs: update code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
0x6b committed Feb 7, 2022
1 parent c784203 commit d82996f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ func bootstrap(bootstrapper soratun.Bootstrapper) error {
var currentConfig *soratun.Config = nil

if !dumpConfig {
// if current config exists, pass it to the bootstrapper to merge if applicable
// Won't check error from `readConfig` because:
//
// 1. In the very first run, which means no `arc.json` in the file system, the `readConfig` always fail.
// We should move bootstrapping process forward.
// 2. Also bootstrap process—creating a new virtual SIM—should be finished successfully regardless of error
// (read failure, invalid JSON format, etc.) Once failed (= `currentCOnfig` is `nil`), Bootstrapper#Execute
// will create a fresh `soratun.Config` (it will vary on each bootstrap method) and can move the process
// forward. Bootstrapper will update existing configuration.
currentConfig, _ = readConfig(configPath)
}

Expand Down

0 comments on commit d82996f

Please sign in to comment.