]> git.mjollnir.org Git - cil.git/commitdiff
Stop warnings if some ENV vars aren't defined.
authorAndrew Chilton <andychilton@gmail.com>
Mon, 5 May 2008 11:27:19 +0000 (23:27 +1200)
committerAndrew Chilton <andychilton@gmail.com>
Mon, 5 May 2008 11:27:19 +0000 (23:27 +1200)
bin/cil

diff --git a/bin/cil b/bin/cil
index 89157393fed3608fd5d1243586d36e3e37a683b3..4ef1f89ad74477484122c147482f18fc648a49f8 100755 (executable)
--- a/bin/cil
+++ b/bin/cil
@@ -19,7 +19,6 @@
 
 use strict;
 use warnings;
-use Data::Dumper;
 use CIL::Issue;
 use CIL::Comment;
 use Term::CallEditor;
@@ -37,11 +36,14 @@ my $COMMANDS = {
     comment => 1,
 };
 
+my $gan = $ENV{GIT_AUTHOR_NAME} || 'Your Name';
+my $gae = $ENV{GIT_AUTHOR_EMAIL} || 'you@example.org';
+
 my $new_issue_text = <<"EOF";
 [Issue]
 Summary     =
 Status      =New
-CreatedBy   =$ENV{GIT_AUTHOR_NAME} <$ENV{GIT_AUTHOR_EMAIL}>
+CreatedBy   =$gan <$gae>
 Labels      =
 Description = <<END_OF_DESCRIPTION
 
@@ -50,7 +52,7 @@ EOF
 
 my $add_comment_text = <<"EOF";
 [Comment]
-CreatedBy   = $ENV{GIT_AUTHOR_NAME} <$ENV{GIT_AUTHOR_EMAIL}>
+CreatedBy   = $gan <$gae>
 Description = <<END_OF_DESCRIPTION
 
 END_OF_DESCRIPTION