mirror of
https://github.com/containers/podman.git
synced 2025-11-30 01:58:46 +08:00
If the `Mount` option inside a quadlet is missing the source=... part,
the code today panics with the following message.
```
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/containers/podman/v5/pkg/systemd/quadlet.handleStorageSource(0xc000140de0?, 0x1d?, {0x0?, 0x1?}, 0x5634e39e233e?, 0x10?)
...
```
This commit checks for the missing source and returns an error to avoid the panic.
Signed-off-by: Jakob Meier <mail@jakobmeier.ch>
7 lines
125 B
Plaintext
7 lines
125 B
Plaintext
## assert-failed
|
|
## assert-stderr-contains "source cannot be empty"
|
|
|
|
[Container]
|
|
Image=localhost/imagename
|
|
Mount=/home:/home
|