04a1ecc4f4
validate-glide is called with errexit enabled (in script/make.sh that sources validate-glide), which means that grep returning a non-zero exit code will cause the script to terminate prematurely. Thus, we will never get to the point where we see the error message. The fix is to embed the grep check directly inside the if statement.
13 lines
276 B
Bash
Executable file
13 lines
276 B
Bash
Executable file
#!/bin/bash
|
|
|
|
source "$(dirname "$BASH_SOURCE")/.validate"
|
|
|
|
if grep -q "$(glide-hash)" glide.lock; then
|
|
echo 'Congratulations! glide.lock is unchanged.'
|
|
else
|
|
{
|
|
echo "Error: glide.lock has been manually changed. Don't do this. Use glide up instead."
|
|
echo
|
|
} >&2
|
|
false
|
|
fi
|