fix validation for docker volumes

pull/75/head
cupcakearmy 4 years ago
parent c9f425ef64
commit d4522c7ffe
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

@ -12,7 +12,7 @@ import (
"github.com/spf13/viper" "github.com/spf13/viper"
) )
const VERSION = "1.0.8" const VERSION = "1.0.9"
var CI bool = false var CI bool = false
var VERBOSE bool = false var VERBOSE bool = false

@ -49,6 +49,7 @@ func (l Location) validate(c *Config) error {
if l.From == "" { if l.From == "" {
return fmt.Errorf(`Location "%s" is missing "from" key`, l.name) return fmt.Errorf(`Location "%s" is missing "from" key`, l.name)
} }
if l.getType() == TypeLocal {
if from, err := GetPathRelativeToConfig(l.From); err != nil { if from, err := GetPathRelativeToConfig(l.From); err != nil {
return err return err
} else { } else {
@ -60,6 +61,7 @@ func (l Location) validate(c *Config) error {
} }
} }
} }
}
if len(l.To) == 0 { if len(l.To) == 0 {
return fmt.Errorf(`Location "%s" has no "to" targets`, l.name) return fmt.Errorf(`Location "%s" has no "to" targets`, l.name)

Loading…
Cancel
Save