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_r125415455
##########
File path: exercises/creating_python_actions/exercise.js
##########
@@ -38,7 +38,7 @@ exercise.addVerifyProcessor(function (cb) {
exercise.addVerifyProcessor(function (cb) {
shell.exec('wsk action get london-location-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.
The same issue may occur to "nodejs:6", and "swift:3". If you want, they can
be fixed in a same PR.
----------------------------------------------------------------
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