Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Dec 7, 2023
1 parent c29e866 commit d705612
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions integration-tests/baas-test-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function spawnBaaS(tag: string) {

yargs(hideBin(process.argv))
.command(
["run", "$0"],
["run [tag]", "$0 [tag]"],
"Runs the BaaS test image using Docker",
(yargs) => yargs.positional("tag", { type: "string" }).option("branch", { default: "master" }),
async (argv) => {
Expand All @@ -193,9 +193,13 @@ yargs(hideBin(process.argv))
ensureDocker();
ensureNoBaas();

const tag = argv.tag || (await fetchBaasTag(argv.branch));
pullBaas(tag);
spawnBaaS(tag);
if (argv.tag) {
spawnBaaS(argv.tag);
} else {
const tag = await fetchBaasTag(argv.branch);
pullBaas(tag);
spawnBaaS(tag);
}
} catch (err) {
console.error();
if (err instanceof UsageError) {
Expand Down

0 comments on commit d705612

Please sign in to comment.