diff options
author | Kevin Smith <git@kismith.co.uk> | 2014-02-16 20:08:37 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2014-02-16 21:04:09 (GMT) |
commit | 04189fc42e2eea17b8387976b5b70d72d6c4a5ce (patch) | |
tree | 75199e3c1c7f75e3b82b3bf6171dcc4dfa7e05c2 | |
parent | ba0a79a6fa68f2757795e96a22ff310ebe41a715 (diff) | |
download | swift-contrib-04189fc42e2eea17b8387976b5b70d72d6c4a5ce.zip swift-contrib-04189fc42e2eea17b8387976b5b70d72d6c4a5ce.tar.bz2 |
Don't try to install git hooks when Swift is used as a submodule.
Change-Id: I7c83c416507635f5bba6411824bd1a540dffc910
-rw-r--r-- | BuildTools/SCons/SConstruct | 9 |
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." ################################################################################ |