MCPcopy Index your code
hub / github.com/kopia/kopia / optionsFromFlags

Method optionsFromFlags

cli/config.go:66–88  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

64}
65
66func (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
90func (c *App) repositoryConfigFileName() string {
91 if filepath.Base(c.configPath) != c.configPath {

Callers 1

openRepositoryMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected