Skip to content

Commit

Permalink
Merge pull request #138 from HubSpot/issue/137
Browse files Browse the repository at this point in the history
Help will now be displayed for commands that require an argument when…
  • Loading branch information
miketalley committed Mar 20, 2020
2 parents a5f7fc1 + b0b796c commit 0651479
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hs-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureAuthCommand } = require('../commands/auth');
const program = new Command('hs auth');
configureAuthCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hs-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureCreateCommand } = require('../commands/create');
const program = new Command('hs create');
configureCreateCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hs-remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureRemoveCommand } = require('../commands/remove');
const program = new Command('hs remove');
configureRemoveCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hs-rm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ const { configureRemoveCommand } = require('../commands/remove');
const program = new Command(`hs rm`);
configureRemoveCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hs-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureServerCommand } = require('../commands/server');
const program = new Command('hs server');
configureServerCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hs-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureUploadCommand } = require('../commands/upload');
const program = new Command('hs upload');
configureUploadCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hs-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ const { configureWatchCommand } = require('../commands/watch');
const program = new Command('hs watch');
configureWatchCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hscms-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureAuthCommand } = require('../commands/auth');
const program = new Command('hscms auth');
configureAuthCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hscms-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureCreateCommand } = require('../commands/create');
const program = new Command('hscms create');
configureCreateCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hscms-remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureRemoveCommand } = require('../commands/remove');
const program = new Command('hscms remove');
configureRemoveCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hscms-rm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ const { configureRemoveCommand } = require('../commands/remove');
const program = new Command(`hscms rm`);
configureRemoveCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hscms-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const { configureServerCommand } = require('../commands/server');
const program = new Command('hscms server');
configureServerCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hscms-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ const { configureUploadCommand } = require('../commands/upload');
const program = new Command('hscms upload');
configureUploadCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}
4 changes: 4 additions & 0 deletions packages/cms-cli/bin/hscms-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ const { configureWatchCommand } = require('../commands/watch');
const program = new Command('hscms watch');
configureWatchCommand(program);
program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.help();
}

0 comments on commit 0651479

Please sign in to comment.