cmd/root: Protect against future programmer errors
https://github.com/containers/toolbox/pull/1202
This commit is contained in:
parent
446d7bfdef
commit
2d1eff8f12
|
|
@ -393,6 +393,10 @@ func setUpLoggers() error {
|
|||
}
|
||||
|
||||
func validateSubIDFile(path string) (bool, error) {
|
||||
if utils.IsInsideContainer() {
|
||||
panic("cannot validate sub-IDs inside container")
|
||||
}
|
||||
|
||||
logrus.Debugf("Validating sub-ID file %s", path)
|
||||
|
||||
file, err := os.Open(path)
|
||||
|
|
|
|||
Loading…
Reference in New Issue