From a25f38cd6b17a43a1a3689ee15d0f80fdc8d4680 Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Thu, 2 Oct 2014 17:05:39 -0700 Subject: [PATCH] fix(bin/linja): avoid using realpath on msys2 --- bin/linja | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/linja b/bin/linja index 878d2cad36..995dc4ed16 100755 --- a/bin/linja +++ b/bin/linja @@ -21,7 +21,12 @@ import tempfile import threading import urllib -g_linja_path = os.path.abspath(os.path.realpath(__file__)) +if platform.system().startswith("MSYS"): + # In MSYS platform, realpath has a strange behavior. + # os.path.realpath("c:\a\b\c") => \:\a\b\c + g_linja_path = os.path.abspath(os.path.normpath(__file__)) +else: + g_linja_path = os.path.abspath(os.path.realpath(__file__)) g_lean_bin_dir = os.path.dirname(g_linja_path) g_phony_targets = ["clean", "tags", "clear-cache"] g_project_filename = ".project"