From f87fd015c530dbda12ec2447761b4e6fb1f4360a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Wed, 28 Oct 2015 18:15:14 +0200 Subject: [PATCH] Don't fetch Emscripten tags if git is not present. --- emsdk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/emsdk b/emsdk index e700ae3..67a6d7a 100755 --- a/emsdk +++ b/emsdk @@ -1192,6 +1192,20 @@ def version_compare(x, y): return a - b def fetch_emscripten_tags(): + git = GIT(must_succeed=False) + if not git: + print('Update complete, however skipped fetching the Emscripten tags, since git was not found.') + if WINDOWS: + print("If you want to compile one of the tagged releases from source, please install git by typing 'emsdk install git-1.9.4', or alternatively by installing it manually from http://git-scm.com/downloads . If you install git manually, remember to add it to PATH.") + elif OSX: + print("If you want to compile one of the tagged releases from source, please install git from http://git-scm.com/ , or by installing XCode and then the XCode Command Line Tools (see http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools ).") + elif LINUX: + print("If you want to compile one of the tagged releases from source, please install git using your package manager, see http://git-scm.com/book/en/Getting-Started-Installing-Git .") + else: + print("If you want to compile one of the tagged releases from source, please install git.") + print("If you are not looking to build Emscripten from source, you can safely ignore this message.") + return + print('Fetching all tags from Emscripten Github repository...') tags = run_get_output([GIT(), 'ls-remote', '--tags', emscripten_git_repo]) if tags[0] != 0: return False # failed to get tags?