From 04189fc42e2eea17b8387976b5b70d72d6c4a5ce Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Sun, 16 Feb 2014 20:08:37 +0000 Subject: Don't try to install git hooks when Swift is used as a submodule. Change-Id: I7c83c416507635f5bba6411824bd1a540dffc910 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." ################################################################################ -- cgit v0.10.2-6-g49f6