Commit 3bd05d83 authored by Blaise Li's avatar Blaise Li
Browse files

Trying to identify whether installer is root.

$USER is not defined in a singularity container.
parent 52c1f4c3
......@@ -67,7 +67,7 @@ doctest --version 2> /dev/null \
stack ${stack_options} build --exec "hlint src/Main.hs" --exec "scan -j False src/Main.hs" --exec "doctest src/Main.hs"
if [ "${USER}" == "root" ]
if [ $(id -u) = 0 ]
# We don't want things to be installed in root's home directory.
stack install --local-bin-path "/usr/local/bin"
Supports Markdown
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