Assume that we have two linja processes running on a system where there
is no ninja installed. Then, the first linja process downloads ninja
from github. If the internet is slow, the second linja process can pick
up the incomplete ninja binary and execute it, which causes an
exception (i.e. "Malformed Mach-o file" error on OSX). An example build
trace is at
https://s3.amazonaws.com/archive.travis-ci.org/jobs/56366771/log.txt
This commit fixes the problem by downloading ninja to a temporary
directory and copy it to "lean/bin/ninja" when it's completed.
Removing empty lines for FlyCheck messages was added by
4266b8c7a3. We had somecases where
Flycheck messages start with an empty line instead of `FLYCHECK_BEGIN
ERROR` in Windows7 + Python2 env. I think it's because of the different
newline character problem (LF, LFCR). My solution was to remove all
empty lines, which was too much. Now, I think striping should be enoguh.
fix#512
Ubuntu-12/14 has two packages which provide a binary file `ninja`:
1. ninja : http://forkbomb.org/ninja/
2. ninja-build : http://martine.github.io/ninja/
We had a case where a user has ninja installed instead of ninja-build,
then linja confuses that it has ninja-build and tries to use it.
This commit excludes a directory whose name includes "sbin" in finding a
system program. As a result, `which` will not find ninja[1] which
resides at /usr/sbin.