Commit 7012ed85 authored by thomie's avatar thomie Committed by Austin Seipp

Check if file is present instead of directory

Fixes #8886.

Problem: any `sync-all` command that is run before the first succesfull
`sync-all get` would trigger a false warning about an old `time` package
being present.

Cause: after cloning the ghc repository, the (empty) `libraries/time`
directory is already present.

Solution: check if the directory actually contains any of the `time`
files. I picked the `LICENSE` file, since `boot` does so as well.
Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 806d823e
......@@ -964,7 +964,7 @@ EOF
}
}
message "== Checking for old time from tarball";
if (-d "libraries/time" and ! -e "libraries/time/.git") {
if (-f "libraries/time/LICENSE" and ! -e "libraries/time/.git") {
print <<EOF;
============================
ATTENTION!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment