Skip to content

Commit

Permalink
[Interp] Supress uninitalized value if abs_path fails (closes #120 by…
Browse files Browse the repository at this point in the history
… Craig Andrews @candrews).
  • Loading branch information
liske committed Jun 24, 2018
1 parent 0dadb2c commit 071b9e4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ needrestart (3.3) unstable; urgency=high
(Debian Bug#902031 by Axel Beckert <abe@debian.org>)
(Debian Bug#902049 by Jon <nuxi@vault24.org>)
(github issue #121 by Sven Hartge @shartge)
- [Interp] Supress uninitalized value if abs_path fails.
(github issue #120 by Craig Andrews @candrews)

-- Thomas Liske <thomas@fiasko-nw.net>

Expand Down
4 changes: 2 additions & 2 deletions perl/lib/NeedRestart/Interp/Perl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ sub source {

my $src = abs_path($ARGV[0]);
chdir($cwd);
unless(-r $src && -f $src) {
unless(defined($src) && -r $src && -f $src) {
print STDERR "$LOGPREF #$pid: source file not found, skipping\n" if($self->{debug});
print STDERR "$LOGPREF #$pid: reduced ARGV: ".join(' ', @ARGV)."\n" if($self->{debug});
return undef;
Expand Down Expand Up @@ -136,7 +136,7 @@ sub files {
return ();
}
my $src = abs_path ($ARGV[0]);
unless(-r $src && -f $src) {
unless(defined($src) && -r $src && -f $src) {
chdir($cwd);
print STDERR "$LOGPREF #$pid: source file not found, skipping\n" if($self->{debug});
print STDERR "$LOGPREF #$pid: reduced ARGV: ".join(' ', @ARGV)."\n" if($self->{debug});
Expand Down
4 changes: 2 additions & 2 deletions perl/lib/NeedRestart/Interp/Python.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ sub source {

my $src = abs_path($ARGV[0]);
chdir($cwd);
unless(-r $src && -f $src) {
unless(defined($src) && -r $src && -f $src) {
print STDERR "$LOGPREF #$pid: source file not found, skipping\n" if($self->{debug});
print STDERR "$LOGPREF #$pid: reduced ARGV: ".join(' ', @ARGV)."\n" if($self->{debug});
return undef;
Expand Down Expand Up @@ -167,7 +167,7 @@ sub files {
return ();
}
my $src = abs_path ($ARGV[0]);
unless(-r $src && -f $src) {
unless(defined($src) && -r $src && -f $src) {
chdir($cwd);
print STDERR "$LOGPREF #$pid: source file not found, skipping\n" if($self->{debug});
print STDERR "$LOGPREF #$pid: reduced ARGV: ".join(' ', @ARGV)."\n" if($self->{debug});
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/NeedRestart/Interp/Ruby.pm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ sub source {

my $src = abs_path($ARGV[0]);
chdir($cwd);
unless(-r $src && -f $src) {
unless(defined($src) && -r $src && -f $src) {
print STDERR "$LOGPREF #$pid: source file '$src' not found, skipping\n" if($self->{debug});
print STDERR "$LOGPREF #$pid: reduced ARGV: ".join(' ', @ARGV)."\n" if($self->{debug});
return undef;
Expand Down

0 comments on commit 071b9e4

Please sign in to comment.