Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyreilly committed Nov 8, 2024
1 parent 5db3ac1 commit aaa6fe8
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ export async function bin(args: string[]) {
const introPrompts = `${chalk.blueBright(`📦🔑 Welcome to`)} ${chalk.bgBlueBright.black(`ado-npm-auth-lite`)} ${chalk.blueBright(`${version}! 📦🔑`)}`;
const outroPrompts = `${chalk.blueBright(`📦🔑 Thanks for using`)} ${chalk.bgBlueBright.black(`ado-npm-auth-lite`)} ${chalk.blueBright(`${version}! 📦🔑`)}`;

if (ci.isCI) {
prompts.intro(introPrompts);
logLine();
logLine(
`Detected that you are running on a CI server (${ci.name ?? ""}) and so will not generate a user .npmrc file`,
);
prompts.outro(outroPrompts);

return StatusCodes.Success;
}

const { values } = parseArgs({
args,
options,
Expand All @@ -57,7 +46,6 @@ export async function bin(args: string[]) {
}

prompts.intro(introPrompts);

logLine();

const mappedOptions = {
Expand Down Expand Up @@ -85,6 +73,16 @@ export async function bin(args: string[]) {

const { config, email } = optionsParseResult.data;

// TODO: this will prevent this file from running tests on the server after this - create an override parameter
if (ci.isCI) {
logLine(
`Detected that you are running on a CI server (${ci.name ?? ""}) and so will not generate a user .npmrc file`,
);
prompts.outro(outroPrompts);

return StatusCodes.Success;
}

prompts.log.info(`options:
- config: ${config ?? "[NONE SUPPLIED - WILL USE DEFAULT]"}
- email: ${email ?? "[NONE SUPPLIED - WILL USE DEFAULT]"}`);
Expand Down

0 comments on commit aaa6fe8

Please sign in to comment.