-
Notifications
You must be signed in to change notification settings - Fork 369
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
Reject piped input (/dev/stdin) for BedToIntervalList #1918
Conversation
For #1890 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment/request
@@ -114,8 +114,13 @@ public class BedToIntervalList extends CommandLineProgram { | |||
@Override | |||
protected int doWork() { | |||
IOUtil.assertFileIsReadable(INPUT); | |||
if(INPUT.getPath().equals("/dev/stdin")) { | |||
throw new IllegalArgumentException("BedToIntervalList cannot read from /dev/stdin."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit of a nit, but this error message could be interpreted to mean that reading from the input is acceptable, but just failing for some reason - I would suggest explicitly stating that reading from stdin is not supported:
throw new IllegalArgumentException("BedToIntervalList cannot read from /dev/stdin."); | |
throw new IllegalArgumentException("BedToIntervalList does not support reading from standard input - a file must be provided"); |
We should also add a test to verify this.
@kockan I'm happy to make these changes if you like - just let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmnbroad Of course, please feel free to push to my branch
4a8976f
to
ccdbb90
Compare
As the title states, reject piped input (/dev/stdin) for BedToIntervalList since it cannot process such input.