Skip to content

Commit

Permalink
Fix for CLI invocation with no params
Browse files Browse the repository at this point in the history
  • Loading branch information
adambar committed Sep 7, 2018
1 parent 362ae60 commit 07e8c43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cloudform/cli/cloudform.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const options = {
let shouldShowUsageInfo = true;
function parseParam(idx) {
const param = process.argv[idx];
if (param.startsWith('-')) {
if (param && param.startsWith('-')) {
if (param === '-m' || param === '--minify') {
options.shouldMinify = true;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudform/cli/cloudform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let shouldShowUsageInfo = true
function parseParam(idx: number) {
const param = process.argv[idx]

if (param.startsWith('-')) {
if (param && param.startsWith('-')) {
if (param === '-m' || param === '--minify') {
options.shouldMinify = true
} else {
Expand Down

0 comments on commit 07e8c43

Please sign in to comment.