Skip to content

Commit

Permalink
Add first apps test
Browse files Browse the repository at this point in the history
  • Loading branch information
Benni-Math committed Aug 31, 2024
1 parent 91dfe27 commit ff9d5b9
Show file tree
Hide file tree
Showing 4 changed files with 379 additions and 33 deletions.
21 changes: 16 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class CacclDeployCommander extends Command {
}
}

async function main() {
async function setupCLI() {
// confirm ASAP that the user's AWS creds/config is good to go
if (!aws.isConfigured() && process.env.NODE_ENV !== 'test') {
byeWithCredentialsError();
Expand Down Expand Up @@ -1171,10 +1171,21 @@ async function main() {
exitWithSuccess('task scheduled');
});

return cli;
}

async function main() {
const cli = await setupCLI();
await cli.parseAsync(process.argv);
}

main().catch((err) => {
console.error(err);
process.exit(1);
});
module.exports = {
setupCLI,
};

if (require.main === module) {
main().catch((err) => {
console.error(err);
process.exit(1);
});
}
Loading

0 comments on commit ff9d5b9

Please sign in to comment.