1
0

fix handling of properties

applies to "semi-interactive mode"
This commit is contained in:
Konstantin Demin 2024-02-26 19:07:23 +03:00
parent 391cdbc100
commit 1a78b41e11
Signed by: krd
GPG Key ID: 1F33CB0BA4731BC6

View File

@ -103,20 +103,19 @@ func (p *Plugin) parseSettings() error {
}
rawProps := p.Settings.Properties.Value()
if len(rawProps) == 0 {
return errors.New("nexus.properties: empty")
}
if rawProps[0] == "" {
return errors.New("nexus.properties: empty")
}
// very naive
for i := range rawProps {
if rawProps[i] == "" {
continue
if len(rawProps) != 0 {
if rawProps[0] == "" {
return errors.New("nexus.properties: empty")
}
switch rawProps[i][0] {
case '{', '[':
return errors.New("'nexus.properties' must be plain comma-separated list, not JSON-like object")
// very naive
for i := range rawProps {
if rawProps[i] == "" {
continue
}
switch rawProps[i][0] {
case '{', '[':
return errors.New("'nexus.properties' must be plain comma-separated list, not JSON-like object")
}
}
}