{"action":"opened","issue":{"url":"https://api.github.com/repos/tools/godep/issues/401","labels_url":"https://api.github.com/repos/tools/godep/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/tools/godep/issues/401/comments","events_url":"https://api.github.com/repos/tools/godep/issues/401/events","html_url":"https://github.com/tools/godep/issues/401","id":127783861,"number":401,"title":"godep save -r seems completely busted unless you run from inside your project in $GOPATH.","user":{"login":"parkr","id":237985,"avatar_url":"https://avatars.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-20T21:06:57Z","updated_at":"2016-01-20T21:06:57Z","closed_at":null,"body":"Hey,\r\n\r\nI was working on https://github.com/jekyll/dashboard in `~/jekyll/dashboard` and `godep save` and `godep save -r` and `godep save .` and `godep save ./...` (etcetera) all failed. I had it symlinked to `$GOPATH/src/github.com/jekyll/dashboard`, but no dice. None of it worked.\r\n\r\n**It would be nice if `godep` would fail when being run outside of `$GOPATH/src`**\r\n\r\n### Steps to reproduce\r\n\r\n1. `mkdir ~/my-new-proj && cd my-new-proj`\r\n2. Write a go program that imports at least 1 external package\r\n3. `godep save ./...`\r\n4. `godep go build ./...`\r\n\r\n### Expected Behaviour\r\n\r\nStep 3 would vendor all my imports into `Godeps/_workspace` and write the metadata out to `Godeps/Godeps.json`. It would rewrite the imports to point to this new vendored workspace\r\n\r\nStep 4 would build my project with those vendored imports.\r\n\r\n### Actual Behaviour\r\n\r\nStep 3 creates `Godeps/`, but `Godeps.json` contains only:\r\n\r\n```js\r\n{\r\n    \"ImportPath\": \".\",\r\n    \"GoVersion\": \"go1.5\",\r\n    \"Deps\": []\r\n}\r\n```\r\n\r\nand `_workspace` is empty.\r\n\r\nStep 4 works fine, but it's not using the vendored packages because there's nothing vendored.\r\n\r\n### Steps to Resolve\r\n\r\n1. `mv ~/my-new-project $GOPATH/src/github.com/you/my-new-project`\r\n2. `cd $GOPATH/src/github.com/you/my-new-project`\r\n3. Repeat step 3\r\n4. Repeat step 4"}}