Skip to content

Commit 1a2ffa6

Browse files
committed
Format a better error message when a bad spec is requested in a PR
[skip ci] Signed-off-by: Adam Brousseau <[email protected]>
1 parent a8f3a29 commit 1a2ffa6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

buildenv/jenkins/common/pipeline-functions.groovy

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2017, 2019 IBM Corp. and others
2+
* Copyright (c) 2017, 2020 IBM Corp. and others
33
*
44
* This program and the accompanying materials are made available under
55
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -777,7 +777,11 @@ def setup_pull_request_single_comment(PARSED_COMMENT) {
777777
if (LONG_PLATFORM) {
778778
PLATFORMS.addAll(LONG_PLATFORM)
779779
} else {
780-
error("Unknown PLATFORM short:'${SHORT}'\nExpected one of:${SHORT_NAMES}")
780+
def shortNamesList = []
781+
SHORT_NAMES.each {
782+
shortNamesList.add(it.key)
783+
}
784+
error("Unknown PLATFORM short:'${SHORT}'\nExpected one of:${shortNamesList}")
781785
}
782786
}
783787
echo "PLATFORMS:'${PLATFORMS}'"

0 commit comments

Comments
 (0)