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

Incorrect exit code returned when permissions error occurs with --onlySeagate flag #43

Open
natanlidukhover opened this issue Nov 6, 2020 · 1 comment
Assignees

Comments

@natanlidukhover
Copy link

When running a -i on all drives (-d all) without proper permissions (i.e. user not in disk group and/or not run as root/sudo), the drive information is not accessed and the exit code returned is 3. However, when including the --onlySeagate flag, the drive information is similarly not accessed, and a permissions error is displayed, but the exit code returned is 0, indicating a successful operation.

The same bug occurs with a --modelMatch ST flag as well. The issue also occurs on a machine with all Seagate drives. I have included a few images of the issue occurring below, where the user is neither a superuser nor in the "disk" group.

image
image

@vonericsen vonericsen self-assigned this Nov 10, 2020
@vonericsen
Copy link
Contributor

The reason this does not return any errors with --onlySeagate or --modelMatch is because those devices will be entirely skipped if they do not have the necessary information for the tool to make those comparisons. Then, since none of the options are actually run on an device, no errors are ever detected to trigger a different exit code.

I will need to think about the best way to handle this.

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

No branches or pull requests

2 participants