Skip to content

Commit

Permalink
modify auth check to be lenient if ionos token set
Browse files Browse the repository at this point in the history
  • Loading branch information
avirtopeanu-ionos committed Jun 6, 2024
1 parent 52784dd commit a4ffd1f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@ export default class Run extends Command {
configService.setDebug(flags.debug).setVerbose(flags.verbose)

/* first of all check credentials env vars */
if (process.env.IONOS_USERNAME === undefined) {
this.error('IONOS_USERNAME env var is missing')
}
if (process.env.IONOS_TOKEN === undefined) {
if (process.env.IONOS_USERNAME === undefined) {
this.error('Either IONOS_TOKEN env var must be set or IONOS_USERNAME env var is missing');

Check failure on line 86 in src/commands/run.ts

View workflow job for this annotation

GitHub Actions / build (14.x)

Extra semicolon

Check failure on line 86 in src/commands/run.ts

View workflow job for this annotation

GitHub Actions / build (15.x)

Extra semicolon
}

if (process.env.IONOS_PASSWORD === undefined) {
this.error('IONOS_PASSWORD env var is missing')
if (process.env.IONOS_PASSWORD === undefined) {
this.error('Either IONOS_TOKEN env var must be set or IONOS_PASSWORD env var is missing');

Check failure on line 90 in src/commands/run.ts

View workflow job for this annotation

GitHub Actions / build (14.x)

Extra semicolon

Check failure on line 90 in src/commands/run.ts

View workflow job for this annotation

GitHub Actions / build (15.x)

Extra semicolon
}
}

let driver: Driver | undefined
Expand Down

0 comments on commit a4ffd1f

Please sign in to comment.