Skip to content

sg: fix nil panic introduced in 284aba024

Warren Gifford requested to merge mrn/fix-nil-panic into main

Created by: mrnugget

Two problems:

  • We'd try to build a secrets manager for all commands, even if they didn't have secrets. That would fail if it wasn't configured.
  • That error was not surfaced, because we'd do an if err != nil { return err } but the previous defer would run into nil-panic by trying to use sc.

Test plan

  • go run ./dev/sg run github-proxy failed with nil panic before, now it doesn't.

Merge request reports

Loading