| 64 | } |
| 65 | |
| 66 | func (c *App) optionsFromFlags(ctx context.Context) *repo.Options { |
| 67 | return &repo.Options{ |
| 68 | TraceStorage: c.traceStorage, |
| 69 | DisableRepositoryLog: c.disableRepositoryLog, |
| 70 | UpgradeOwnerID: c.upgradeOwnerID, |
| 71 | DoNotWaitForUpgrade: c.doNotWaitForUpgrade, |
| 72 | ContentLogWriter: c.contentLogWriter, |
| 73 | |
| 74 | // when a fatal error is encountered in the repository, run all registered callbacks |
| 75 | // and exit the program. |
| 76 | OnFatalError: func(err error) { |
| 77 | log(ctx).Debugf("onFatalError: %v", err) |
| 78 | |
| 79 | for _, cb := range c.onFatalErrorCallbacks { |
| 80 | cb(err) |
| 81 | } |
| 82 | |
| 83 | c.exitWithError(err) |
| 84 | }, |
| 85 | |
| 86 | TestOnlyIgnoreMissingRequiredFeatures: c.testonlyIgnoreMissingRequiredFeatures, |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | func (c *App) repositoryConfigFileName() string { |
| 91 | if filepath.Base(c.configPath) != c.configPath { |