Skip to content

Conversation

@frankiejol
Copy link
Member

Also do not show duplicate login failed message

Also login failed message improved
Copilot AI review requested due to automatic review settings January 14, 2026 09:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors progress output to only display when a terminal is present and removes duplicate login failure messages from the error flow.

Changes:

  • Modified progress indicator printing to check for $ENV{TERM} presence before outputting
  • Updated login error handling to suppress duplicate "Login failed" error messages
  • Removed password from default admin user creation log message
  • Added database index on id_bundle column in domains_bundle table

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
script/rvd_front Filters out duplicate "Login failed" error messages in the login error handling
lib/Ravada/Auth/SQL.pm Added newline character to "Login failed" error message for cleaner output
lib/Ravada.pm Added $ENV{TERM} checks to all progress print statements, removed password from admin user creation warning, and added index on id_bundle column

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (defined $login && defined $password) {
eval { $auth_ok = Ravada::Auth::login($login, $password)};
push @error,($@) if $@;
push @error,($@) if $@ && $@ !~ /Login failed/;
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern $@ !~ /Login failed/ is case-sensitive and could fail to match if the error message capitalization changes. Additionally, the error message in lib/Ravada/Auth/SQL.pm now ends with a newline character, which could affect the pattern matching if not accounted for. Consider using a case-insensitive match with the /i flag or anchoring the pattern appropriately to ensure reliable matching.

Suggested change
push @error,($@) if $@ && $@ !~ /Login failed/;
push @error,($@) if $@ && $@ !~ /Login failed/i;

Copilot uses AI. Check for mistakes.
@frankiejol frankiejol added this to the v2.4.3 milestone Jan 14, 2026
@frankiejol frankiejol merged commit a91bae6 into main Jan 14, 2026
7 checks passed
@frankiejol frankiejol deleted the refactor/install branch January 14, 2026 09:49
@frankiejol frankiejol restored the refactor/install branch January 21, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants