fixed VersionCheck testing for git

This commit is contained in:
frank-cizmich
2015-06-03 17:28:40 -03:00
parent 66c74af47b
commit f033330b33
20 changed files with 133 additions and 38 deletions

View File

@@ -105,13 +105,18 @@ sub version_check {
# and it is by default because the option is on by default in PT 2.2.
# However, we do not want dev and testing to v-c, so even though this
# sub is called, force should be false because $o->got('version-check')
# is false, then check for a .bzr dir which indicates dev or testing.
# is false, then check for a .bzr or .git dir which indicates dev or testing.
# ../.bzr is when a tool is ran from /bin/; ../../.bzr is when a tool
# is ran as a module from /t/<tool>/.
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) {
if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) {
&& (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return;
}