mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-02 02:34:03 +00:00
Fix handling of empty strings for default docker volumes (#1209)
This commit is contained in:
@@ -64,6 +64,9 @@ func (e *docker) Load() error {
|
|||||||
e.volumes = make([]string, 0, len(volumes))
|
e.volumes = make([]string, 0, len(volumes))
|
||||||
// Validate provided volume definitions
|
// Validate provided volume definitions
|
||||||
for _, v := range volumes {
|
for _, v := range volumes {
|
||||||
|
if v == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
parts, err := splitVolumeParts(v)
|
parts, err := splitVolumeParts(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msgf("invalid volume '%s' provided in WOODPECKER_BACKEND_DOCKER_VOLUMES", v)
|
log.Error().Err(err).Msgf("invalid volume '%s' provided in WOODPECKER_BACKEND_DOCKER_VOLUMES", v)
|
||||||
|
Reference in New Issue
Block a user