Skip to content

Commit

Permalink
feat!: restructure the open command (#1260)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandenrodgers authored Nov 22, 2024
1 parent eefb1e0 commit 60389fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions commands/open.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @ts-nocheck
import { EXIT_CODES } from '../lib/enums/exitCodes';
const {
addAccountOptions,
addConfigOptions,
Expand Down Expand Up @@ -38,12 +39,12 @@ exports.handler = async options => {
if (shortcut === undefined && !list) {
const choice = await createListPrompt(derivedAccountId);
openLink(derivedAccountId, choice.open);
} else if (list || shortcut === 'list') {
} else if (list) {
logSiteLinks(derivedAccountId);
return;
} else {
openLink(derivedAccountId, shortcut);
}
process.exit(EXIT_CODES.SUCCESS);
};

exports.builder = yargs => {
Expand Down
2 changes: 1 addition & 1 deletion lang/en.lyaml
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ en:
moveFailed: "Moving \"{{ srcPath }}\" to \"{{ destPath }}\" in account {{ accountId }} failed"
move: "Moved \"{{ srcPath }}\" to \"{{ destPath }}\" in account {{ accountId }}"
open:
describe: "Open a HubSpot page in your browser. Run \"hs open list\" to see all available shortcuts."
describe: "Open a HubSpot page in your browser."
options:
list:
describe: "List all supported shortcuts"
Expand Down

0 comments on commit 60389fb

Please sign in to comment.