Skip to content

Commit

Permalink
Add insufficient-permission message
Browse files Browse the repository at this point in the history
  • Loading branch information
aswasif007 committed Feb 14, 2024
1 parent cf3dd85 commit a4089c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/commands/phpmyadmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ export class PhpMyAdminCommand {
stack: error.stack,
} );
this.stopProgressTracker();

if ( error.graphQLErrors?.find( e => e.message === 'Unauthorized' ) ) {

Check warning on line 205 in src/commands/phpmyadmin.ts

View workflow job for this annotation

GitHub Actions / Lint

Identifier name 'e' is too short (< 2)
exit.withError(
'You do not have sufficient permission to access phpMyAdmin for this environment.'
);
}

exit.withError(
'Failed to enable PhpMyAdmin. Please try again. If the problem persists, please contact support.'
);
Expand Down

0 comments on commit a4089c2

Please sign in to comment.