Skip to content

Commit

Permalink
Override command type for --function and --stack deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongquay authored Mar 26, 2021
1 parent ffb7356 commit ab4ec10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,8 @@ var cmdOPS = (argv._[0] || 'list').toUpperCase()
var optCMD = (argv._.length > 1 ? argv._[1] : undefined)
var cmdArg = argv['stack'] || argv['function'] || optCMD
var cmdType = cmdArg ? fs.existsSync(path.resolve(argv.location, cmdArg, "template.yaml")) ? "CF-Stack" : "Function" : undefined
cmdType = argv['function'] ? "Function" : argv['stack'] ? "CF-Stack" : cmdType

if (argv._.length == 0) {
yargs.showHelp()
console.log(`\n`, ` * ${CBRIGHT}Supported command list${CRESET}:`, '\n')
Expand Down

0 comments on commit ab4ec10

Please sign in to comment.