summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2014-02-16 20:08:37 (GMT)
committerSwift Review <review@swift.im>2014-02-16 21:04:09 (GMT)
commit04189fc42e2eea17b8387976b5b70d72d6c4a5ce (patch)
tree75199e3c1c7f75e3b82b3bf6171dcc4dfa7e05c2 /BuildTools/SCons
parentba0a79a6fa68f2757795e96a22ff310ebe41a715 (diff)
downloadswift-04189fc42e2eea17b8387976b5b70d72d6c4a5ce.zip
swift-04189fc42e2eea17b8387976b5b70d72d6c4a5ce.tar.bz2
Don't try to install git hooks when Swift is used as a submodule.
Change-Id: I7c83c416507635f5bba6411824bd1a540dffc910
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r--BuildTools/SCons/SConstruct9
1 files changed, 6 insertions, 3 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index acbd531..25a1ad3 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -570,9 +570,12 @@ if env.get("docbook_xsl") :
# Set up git hooks
################################################################################
-if env.Dir("#/.git").exists() :
- if not env.GetOption("clean") :
- env.Install("#/.git/hooks", Glob("#/BuildTools/Git/Hooks/*"))
+try:
+ if env.Dir("#/.git").exists() :
+ if not env.GetOption("clean") :
+ env.Install("#/.git/hooks", Glob("#/BuildTools/Git/Hooks/*"))
+except TypeError:
+ print "You seem to be using Swift in a Git submodule. Not installing hooks."
################################################################################