Skip to content

Commit

Permalink
Merge pull request #225 from safing/feature/pm-updates
Browse files Browse the repository at this point in the history
Expose SaveConfig, Remove binmeta utils, improvements
  • Loading branch information
dhaavi authored Dec 19, 2023
2 parents 0607924 + 865cb5d commit 88f974f
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 387 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions config/persistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func loadConfig(requireValidConfig bool) error {
return nil
}

// saveConfig saves the current configuration to file.
// SaveConfig saves the current configuration to file.
// It will acquire a read-lock on the global options registry
// lock and must lock each option!
func saveConfig() error {
func SaveConfig() error {
optionsLock.RLock()
defer optionsLock.RUnlock()

Expand Down
2 changes: 1 addition & 1 deletion config/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func setConfigOption(key string, value any, push bool) (err error) {
// finalize change, activate triggers
signalChanges()

return saveConfig()
return SaveConfig()
}

// SetDefaultConfigOption sets a single value in the (fallback) default config.
Expand Down
2 changes: 1 addition & 1 deletion database/migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (reg *Registry) Migrate(ctx context.Context) (err error) {
if err := m.MigrateFunc(migrationCtx, lastAppliedMigration, target, db); err != nil {
diag.Wrapped = err
diag.FailedMigration = m.Description
tracer.Infof("migration: applied migration for %s: %s - %s", reg.key, target.String(), m.Description)
tracer.Errorf("migration: migration for %s failed: %s - %s", reg.key, target.String(), m.Description)
tracer.Submit()
return diag
}
Expand Down
121 changes: 0 additions & 121 deletions utils/osdetail/binmeta.go

This file was deleted.

15 changes: 0 additions & 15 deletions utils/osdetail/binmeta_default.go

This file was deleted.

47 changes: 0 additions & 47 deletions utils/osdetail/binmeta_test.go

This file was deleted.

78 changes: 0 additions & 78 deletions utils/osdetail/binmeta_windows.go

This file was deleted.

2 changes: 0 additions & 2 deletions utils/osdetail/test/.gitignore

This file was deleted.

Loading

0 comments on commit 88f974f

Please sign in to comment.