Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit code for No players found #326

Open
avidseeker opened this issue Feb 5, 2024 · 0 comments
Open

Exit code for No players found #326

avidseeker opened this issue Feb 5, 2024 · 0 comments
Assignees
Labels

Comments

@avidseeker
Copy link

When no player is found, playerctl should exit with an exit code different than 0.

    if (!one_selected && !no_status_error_messages) {
        g_printerr("No players found\n");
        return 2;
    }

This is so that playerctl can be used in script as follows

playerctl -l && playerctl metadata title

instead of directly having

playerctl metadata title

which results in scripts spamming stderr with No players found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants