Skip to content

Commit

Permalink
improves error message if user doesent exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Judro committed Dec 17, 2024
1 parent 1439267 commit 968f145
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/highscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ FILE *init_state_files() {

struct passwd *pw = getpwnam(username);
if (!pw) {
perror("Failed to get user info");
fprintf(stderr, "Failed to get user info. The user %s may not exist.\n",
username);
exit(EXIT_FAILURE);
}

Expand Down

0 comments on commit 968f145

Please sign in to comment.