From: Matt S Trout Date: Fri, 25 Feb 2011 13:33:44 +0000 (+0000) Subject: only try and mkdir the .git if it doesn't already exist X-Git-Tag: release_1.002002~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13ac7415390fd27a7a7dfeda6abf64c6c15c3126;p=p5sagit%2Fstrictures.git only try and mkdir the .git if it doesn't already exist If it does, the mkdir failes with 'File exists'. Didn't spot this during testing because I only ran the tests once. So we check it's not already there. Cleanup doesn't seem worth it. --- diff --git a/Changes b/Changes index f44da17..48adc58 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + - only try and mkdir the .git if it doesn't already exist so repeated + test runs don't explode 1.002001 - 2011-02-25 - switch .svn to .git in smells-of-vcs test and create it ourselves to ease importing of this dist into subversion repositories diff --git a/t/strictures.t b/t/strictures.t index 47cfa20..e6da256 100644 --- a/t/strictures.t +++ b/t/strictures.t @@ -1,4 +1,7 @@ -mkdir('t/smells-of-vcs/.git') or die "Couldn't create fake .git: $!"; +# -e is sufficient here. +-e 't/smells-of-vcs/.git' + or mkdir('t/smells-of-vcs/.git') + or die "Couldn't create fake .git: $!"; use Test::More qw(no_plan);