Skip to content

Commit 05df425

Browse files
committed
Raise error if an activestate.yaml script has an empty value.
1 parent 6eb18c5 commit 05df425

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

activestate.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ scripts:
7272
echo "goversioninfo was not found on your PATH. Installing .."
7373
GOFLAGS="" go install github.com/josephspurrier/goversioninfo/cmd/[email protected]
7474
fi
75-
- name: install-deps-os
76-
language: bash
77-
standalone: true
78-
if: ne .OS.Name "Linux"
79-
description: Install OS specific deps
80-
value: ""
8175
- name: install-deps-ci
8276
language: bash
8377
standalone: true

pkg/project/project.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ func (p *Project) Scripts() ([]*Script, error) {
154154
scs := projectfile.MakeScriptsFromConstrainedEntities(constrained)
155155
scripts := make([]*Script, 0, len(scs))
156156
for _, s := range scs {
157+
if s.Value == "" {
158+
return nil, locale.NewInputError("err_script_no_value", "Invalid script '[ACTIONABLE]{{.V0}}[/RESET]': 'value' key missing", s.Name)
159+
}
157160
scripts = append(scripts, &Script{s, p})
158161
}
159162
return scripts, nil

0 commit comments

Comments
 (0)