-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix check_go_path when it has spaces in it
- Loading branch information
Showing
2 changed files
with
11 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
#!/bin/sh | ||
|
||
PWD=$1 | ||
set -e | ||
|
||
if [ -z "$PWD" ]; then | ||
echo "must pass in your current working directory" | ||
exit 1 | ||
fi | ||
PKG="$1" | ||
|
||
while [ ${#} -gt 1 ]; do | ||
if [ "$PWD" = "$2" ]; then | ||
exit 0 | ||
fi | ||
shift | ||
PWD="$(realpath "$(pwd)")" | ||
GOPATH="$(go env GOPATH)" | ||
|
||
for p in IFS=: "${GOPATH}"; do | ||
if [ "$PWD" = "$(realpath "$p")/src/$PKG" ]; then | ||
exit 0 | ||
fi | ||
done | ||
|
||
echo "go-ipfs must be built from within your \$GOPATH directory." | ||
echo "expected within '$(go env GOPATH)' but got '$PWD'" | ||
echo "expected within '$GOPATH' but got '$PWD'" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bec0d75
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were the following issues with your Pull Request
We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend
can often help you quickly improve the commit message.Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.
This message was auto-generated by https://gitcop.com