{"action":"created","issue":{"url":"https://api.github.com/repos/goreleaser/godownloader/issues/79","repository_url":"https://api.github.com/repos/goreleaser/godownloader","labels_url":"https://api.github.com/repos/goreleaser/godownloader/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/goreleaser/godownloader/issues/79/comments","events_url":"https://api.github.com/repos/goreleaser/godownloader/issues/79/events","html_url":"https://github.com/goreleaser/godownloader/issues/79","id":331389330,"node_id":"MDU6SXNzdWUzMzEzODkzMzA=","number":79,"title":"Allow global installs","user":{"login":"dnaka91","id":36804488,"node_id":"MDQ6VXNlcjM2ODA0NDg4","avatar_url":"https://avatars2.githubusercontent.com/u/36804488?v=4","gravatar_id":"","url":"https://api.github.com/users/dnaka91","html_url":"https://github.com/dnaka91","followers_url":"https://api.github.com/users/dnaka91/followers","following_url":"https://api.github.com/users/dnaka91/following{/other_user}","gists_url":"https://api.github.com/users/dnaka91/gists{/gist_id}","starred_url":"https://api.github.com/users/dnaka91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnaka91/subscriptions","organizations_url":"https://api.github.com/users/dnaka91/orgs","repos_url":"https://api.github.com/users/dnaka91/repos","events_url":"https://api.github.com/users/dnaka91/events{/privacy}","received_events_url":"https://api.github.com/users/dnaka91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-11T23:50:33Z","updated_at":"2018-06-14T22:39:45Z","closed_at":null,"author_association":"NONE","body":"Currently the script downloads the binary into a `./bin` folder. This is a great idea for tools when developing a go application. So it's easy to control the version of that tool without overriding the global one. This way it's done on the goreleaser repo.\n\nFor non-project related applications or where it's fine to replace the global application, it's more desirable to install it globally.\n\nMy suggestion is to add a `-g, --global` flag (like for example npm has it), that will switch to installing into `$GOPATH/bin`, `/usr/local/bin` or `/usr/bin`. That would work for Linux and Darwin.\n\nThat would also mean, that the script eventually needs to be run as sudo though, depending on the access rights. Homebrew for example can ask for root access dynamically, which would be nice, but I'm not sure if that's possible from bash.\n\nFor Windows it'll be different of course. It's been a while since I used Windows, but probably `AppData` (if I recall right) would be a good place. Plus the `PATH` has to be adjusted as well."},"comment":{"url":"https://api.github.com/repos/goreleaser/godownloader/issues/comments/397459605","html_url":"https://github.com/goreleaser/godownloader/issues/79#issuecomment-397459605","issue_url":"https://api.github.com/repos/goreleaser/godownloader/issues/79","id":397459605,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzQ1OTYwNQ==","user":{"login":"dnaka91","id":36804488,"node_id":"MDQ6VXNlcjM2ODA0NDg4","avatar_url":"https://avatars2.githubusercontent.com/u/36804488?v=4","gravatar_id":"","url":"https://api.github.com/users/dnaka91","html_url":"https://github.com/dnaka91","followers_url":"https://api.github.com/users/dnaka91/followers","following_url":"https://api.github.com/users/dnaka91/following{/other_user}","gists_url":"https://api.github.com/users/dnaka91/gists{/gist_id}","starred_url":"https://api.github.com/users/dnaka91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnaka91/subscriptions","organizations_url":"https://api.github.com/users/dnaka91/orgs","repos_url":"https://api.github.com/users/dnaka91/repos","events_url":"https://api.github.com/users/dnaka91/events{/privacy}","received_events_url":"https://api.github.com/users/dnaka91/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T22:39:45Z","updated_at":"2018-06-14T22:39:45Z","author_association":"NONE","body":"Yes, that would work. But I was hoping to add another flag. So the user doesn't really have to care about where it gets installed, it picks the right place by itself.\n\nMost other scripts, for example the ones you list in the readme, all install to `GOPATH/bin` or `/usr/local/bin`. What is the idea behind installing to `./bin` instead?"}}
{"actor":{"display_login":"dnaka91"}}