markbates / grift

Go based task runner
MIT License
432 stars 24 forks source link

grift fails to find "grifts"-directory #22

Closed maxmeyer closed 6 years ago

maxmeyer commented 6 years ago

Error

Running

# version 0..4.0
grift

in directory, results in error message:

There is no directory named 'grifts'. Run 'grift init' or switch to the appropriate directory
$ pwd
# => ~/tmp/blub.2.2

Expected result

The grift is found and run also in projects which are not in GOPATH.

More information

I use grift in non-go-projects. With version 0.4.0 this is not possible anymore.

rohanthewiz commented 6 years ago

I have the same issue on Windows 10. Git Bash

$ go version #=> go version go1.10.1 windows/amd64
$ grift -v #=> v1.0.2
$ grift init
$ ls -al
total 32
drwxr-xr-x 1 Rohan 1049089 0 Sep  5 16:34 ./
drwxr-xr-x 1 Rohan 1049089 0 Sep  5 16:34 ../
drwxr-xr-x 1 Rohan 1049089 0 Sep  5 16:34 grifts/
$ ls -R
.:
grifts/

./grifts:
example.go
$ grift list
There is no directory named 'grifts'. Run 'grift init' or switch to the appropriate directory
u007 commented 6 years ago

it seems to happen when your directory is not within $GOPATH/src/

u007 commented 6 years ago

with this, it should be allowed to run on non GOPATH

u007 commented 6 years ago

@markbates any updates on this?