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

return non-zero exit code if XML output fails to generate (issue #226), note additional files can be process in -help output #227

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bin/texml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ our %OPT = (debug => 0,

sub usage() {
my $usage = << "EOF";
Usage: $PROGRAM_NAME [options] filename
Usage: $PROGRAM_NAME [options] filename [additional_filenames]

Options:
-help Print this help text and quit.
Expand Down Expand Up @@ -281,6 +281,7 @@ sub process_file( $ ) {

if ($@) {
print "Could not pretty-print file: $@\n";
die;
}
}

Expand Down Expand Up @@ -332,9 +333,9 @@ if ($OPT{debug}) {
}

while (my $tex_file = shift @ARGV) {
do { warn "Can't find $tex_file\n"; next; } unless -e $tex_file;
do { warn "Can't find $tex_file\n"; die; next; } unless -e $tex_file;

do { warn "Can't read $tex_file\n"; next; } unless -r $tex_file;
do { warn "Can't read $tex_file\n"; die; next; } unless -r $tex_file;

process_file($tex_file);

Expand Down