Skip to content

Commit

Permalink
(fix) Do not mandate the presence of a state.json file from CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <[email protected]>
  • Loading branch information
jeromesimeon committed Apr 22, 2019
1 parent b6f8510 commit 1338a78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cicero-cli/lib/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class Commands {
* @param {string} argName the argument name
* @param {string} argDefaultName the argument default name
* @param {Function} argDefaultFun how to compute the argument default
* @param {object} argDefaultValue an optional default value if all else fails
* @returns {object} a modified argument object
*/
static setDefaultFileArg(argv, argName, argDefaultName, argDefaultFun) {
Expand Down Expand Up @@ -263,7 +264,7 @@ class Commands {
argv = Commands.validateCommonArgs(argv);
argv = Commands.setDefaultFileArg(argv, 'sample', 'sample.txt', ((argv, argDefaultName) => { return path.resolve(argv.template,argDefaultName); }));
argv = Commands.setDefaultFileArg(argv, 'request', 'request.json', ((argv, argDefaultName) => { return [path.resolve(argv.template,argDefaultName)]; }));
argv = Commands.setDefaultFileArg(argv, 'state', 'state.json', ((argv, argDefaultName) => { return path.resolve(argv.template,argDefaultName); }));
//argv = Commands.setDefaultFileArg(argv, 'state', 'state.json', ((argv, argDefaultName) => { return path.resolve(argv.template,argDefaultName); }));

if(argv.verbose) {
Logger.info(`execute sample ${argv.sample} using a template ${argv.template} with request ${argv.request} with state ${argv.state}`);
Expand Down

0 comments on commit 1338a78

Please sign in to comment.