summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2023-01-20 12:39:35 -0600
committerChad Elliott <elliottc@objectcomputing.com>2023-01-20 12:39:35 -0600
commitc1e81f1a54a207e21a2728d3485332f4440dcbaf (patch)
treee3051d0a18a22b568824217d9d4151c8c33fd080
parent1b596ecae0dae8c59f47c4f03e174487dd942f2a (diff)
downloadMPC-c1e81f1a54a207e21a2728d3485332f4440dcbaf.tar.gz
Redirect errors from git.
-rw-r--r--modules/Version.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/Version.pm b/modules/Version.pm
index 05459208..7de326a6 100644
--- a/modules/Version.pm
+++ b/modules/Version.pm
@@ -11,6 +11,7 @@ package Version;
# ************************************************************
use strict;
+use File::Spec;
# ************************************************************
# Data Section
@@ -38,7 +39,8 @@ sub get {
my $cwd = Cwd::getcwd();
if (chdir(::getBasePath())) {
## Get the git revision for the final part of the version string.
- my $r = _readVersion('git rev-parse --short HEAD |');
+ my $nul = File::Spec->devnull();
+ my $r = _readVersion("git rev-parse --short HEAD 2> $nul |");
if (defined $r) {
## Store the version for later use, in the event that the git
## revision isn't available in the future.