From d99a04a6edfe2a3b8f5964211e70f0a9d95982a9 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Thu, 30 Oct 2014 11:14:31 -0700 Subject: [PATCH] Detect old Closure directory and prompt to rename. --- build.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 39032f714..898a520c2 100755 --- a/build.py +++ b/build.py @@ -406,7 +406,13 @@ if __name__ == '__main__': calcdeps = import_path(os.path.join(os.path.pardir, 'closure-library', 'closure', 'bin', 'calcdeps.py')) except ImportError: - print("""Error: Closure not found. Read this: + if os.path.isdir(os.path.join(os.path.pardir, 'closure-library-read-only')): + # Dir got renamed when Closure moved from Google Code to GitHub in 2014. + print("Error: Closure directory needs to be renamed from" + "'closure-library-read-only' to 'closure-library'.\n" + "Please rename this directory.") + else: + print("""Error: Closure not found. Read this: https://developers.google.com/blockly/hacking/closure""") sys.exit(1) search_paths = calcdeps.ExpandDirectories(