Skip to content

Commit a48ad88

Browse files
committed
panic if cleanup() is run with an empty container name
1 parent 9a924b3 commit a48ad88

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/commands/rm.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ func (c *RmCommand) removeContainer(
146146
}
147147

148148
func (c *RmCommand) cleanup(ctx context.Context, userHome, containerName string) {
149+
if containerName == "" {
150+
panic("Refusing to run cleanup for empty container name")
151+
}
152+
149153
bins := findExportedBinaries(userHome, containerName)
150154
desktopApps := findExportedDesktopApps(userHome, containerName)
151155

0 commit comments

Comments
 (0)