Skip to content

Commit c1e81f1

Browse files
committed
Redirect errors from git.
1 parent 1b596ec commit c1e81f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/Version.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package Version;
1111
# ************************************************************
1212

1313
use strict;
14+
use File::Spec;
1415

1516
# ************************************************************
1617
# Data Section
@@ -38,7 +39,8 @@ sub get {
3839
my $cwd = Cwd::getcwd();
3940
if (chdir(::getBasePath())) {
4041
## Get the git revision for the final part of the version string.
41-
my $r = _readVersion('git rev-parse --short HEAD |');
42+
my $nul = File::Spec->devnull();
43+
my $r = _readVersion("git rev-parse --short HEAD 2> $nul |");
4244
if (defined $r) {
4345
## Store the version for later use, in the event that the git
4446
## revision isn't available in the future.

0 commit comments

Comments
 (0)