Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Commit

Permalink
wskdebug fails if only action name argument is given #11
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkli committed Aug 15, 2019
1 parent f13cb1d commit 50741e5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/kinds/nodejs/nodejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ module.exports = {

// return extra docker arguments such as mounting the source path
dockerArgs: function(invoker) {
if (!invoker.sourceFile) {
throw new Error("[source-path] must point to the action javascript source file, it cannot be a folder.");
}
if (invoker.sourceDir) {
if (!invoker.sourceFile) {
throw new Error("[source-path] must point to the action javascript source file, it cannot be a folder.");
}

return `-v "${invoker.sourceDir}:${CODE_MOUNT}"`;
return `-v "${invoker.sourceDir}:${CODE_MOUNT}"`;
}
},

// return action for /init that mounts the sources specified by invoker.sourcePath
Expand Down

0 comments on commit 50741e5

Please sign in to comment.