daisy-ycguo commented on a change in pull request #19: fix unmatch python
version
URL:
https://github.com/apache/incubator-openwhisk-workshop/pull/19#discussion_r125415532
##########
File path: exercises/creating_python_actions/exercise.js
##########
@@ -6,7 +6,7 @@ exercise.requireSubmission = false
exercise.addVerifyProcessor(function (cb) {
shell.exec('wsk action get hello-world-python', {silent: true}, (code,
stdout, stderr) => {
const exists = (code === 0)
- const uses_python = (stdout.match('"kind": "python"'))
+ const uses_python = (stdout.match(/\"kind\": \"python:?[\d.]+?"/))
Review comment:
The regular expression should also cover python without version,
i.e.`"python"`, which is a candidate value of `"kind"`. The updated regular
expression cannot cover it. I will suggest to use `stdout.match(/\"kind\":
\"python:?[\d.]?"/)` instead.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services