diff --git a/.travis.yml b/.travis.yml index 202b480..5c558ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - 1.14.x + - 1.15.x matrix: include: - os: linux diff --git a/cmd/fpt/ChangeLog.md b/cmd/fpt/ChangeLog.md index e2f27b8..5effd19 100644 --- a/cmd/fpt/ChangeLog.md +++ b/cmd/fpt/ChangeLog.md @@ -1,3 +1,7 @@ +v1.2.1 / 2020-12-10 +------------------- +* Error if a `script` block does not specify a result in `fpt script` + v1.2.0 / 2020-10-21 ------------------- * Add support for Flexera One refresh tokens using an optional `flexera` boolean parameter in account entries in diff --git a/cmd/fpt/script.go b/cmd/fpt/script.go index 8e6bc5a..aada834 100644 --- a/cmd/fpt/script.go +++ b/cmd/fpt/script.go @@ -114,6 +114,9 @@ func runScript(ctx context.Context, file, outfile, result, name string, options strings.Join(names, " or ")) } } + if result == "" { + return fmt.Errorf("no result variable specified in script block %#v", name) + } } else if result == "" { return fmt.Errorf("no result variable specified for raw JavaScript, pass --result with the name of the variable to extract") } else {