{"action":"created","issue":{"url":"https://api.github.com/repos/heroku/heroku-cli/issues/57","labels_url":"https://api.github.com/repos/heroku/heroku-cli/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/heroku/heroku-cli/issues/57/comments","events_url":"https://api.github.com/repos/heroku/heroku-cli/issues/57/events","html_url":"https://github.com/heroku/heroku-cli/issues/57","id":103362298,"number":57,"title":"Regression in support for BSDs and other OSes","user":{"login":"cac04","id":13987272,"avatar_url":"https://avatars.githubusercontent.com/u/13987272?v=3","gravatar_id":"","url":"https://api.github.com/users/cac04","html_url":"https://github.com/cac04","followers_url":"https://api.github.com/users/cac04/followers","following_url":"https://api.github.com/users/cac04/following{/other_user}","gists_url":"https://api.github.com/users/cac04/gists{/gist_id}","starred_url":"https://api.github.com/users/cac04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cac04/subscriptions","organizations_url":"https://api.github.com/users/cac04/orgs","repos_url":"https://api.github.com/users/cac04/repos","events_url":"https://api.github.com/users/cac04/events{/privacy}","received_events_url":"https://api.github.com/users/cac04/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-26T20:56:38Z","updated_at":"2015-09-24T21:18:23Z","closed_at":null,"body":"If I understand correctly, v3 is written in Ruby, whereas v4 is written in Go. Using Go allows you to ship a self-contained binary, without the dependency on Ruby. This seems like a good thing.\r\n\r\nBut v4 also uses Node. Presumably to avoid having a dependency on a system-wide installation of Node, v4 installs its own copy of Node into `.heroku`. To do this, it downloads a binary release of io.js from https://iojs.org/dist - see `nodeURL()` in `gode/client.go`\r\n\r\nThis uses `runtime.GOOS` to determine which release to download. That's fine if there is a binary release for your platform: so Linux, Windows and OS X are OK. But it doesn't work if there isn't an io.js binary release for your operating system.\r\n\r\nHere's the result on OpenBSD:\r\n\r\n    $ ~/.heroku/heroku-cli\r\n    Setting up iojs-v3.2.0... ▸    gzip: invalid header\r\n\r\nOn OpenBSD, `runtime.GOOS` is `openbsd`. So `nodeURL()` will return https://iojs.org/dist/v3.2.0/iojs-v3.2.0-openbsd-x64.tar.gz - which does not exist.\r\n\r\nYou ought to get a 404 when you try to download it. But it looks like you're then trying to pass the non-existent file to `gzip`.\r\n\r\nSo this won't work on FreeBSD, OpenBSD or any other OS that doesn't have a binary io.js release available for it. That's a shame, as v3 of the Heroku CLI always used to work well on them.\r\n\r\nAt the least, a better error message would be good. Preferably, we either wouldn't need a Node installation at all or we could use a system-wide installation rather than  a sandbox in `.heroku`. I understand why you don't want a dependency on a system-wide installation - but if you're going to use Node (rather than doing everything in Go) then you've got that dependency anyway. Surely it's better to allow use of a system-wide installation than not to work at all?\r\n\r\nWhat is Node (or io.js) used for? I can't actually see any JavaScript in this repo yet. It all seems to be Go."},"comment":{"url":"https://api.github.com/repos/heroku/heroku-cli/issues/comments/143053599","html_url":"https://github.com/heroku/heroku-cli/issues/57#issuecomment-143053599","issue_url":"https://api.github.com/repos/heroku/heroku-cli/issues/57","id":143053599,"user":{"login":"dickeyxxx","id":216188,"avatar_url":"https://avatars.githubusercontent.com/u/216188?v=3","gravatar_id":"","url":"https://api.github.com/users/dickeyxxx","html_url":"https://github.com/dickeyxxx","followers_url":"https://api.github.com/users/dickeyxxx/followers","following_url":"https://api.github.com/users/dickeyxxx/following{/other_user}","gists_url":"https://api.github.com/users/dickeyxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/dickeyxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dickeyxxx/subscriptions","organizations_url":"https://api.github.com/users/dickeyxxx/orgs","repos_url":"https://api.github.com/users/dickeyxxx/repos","events_url":"https://api.github.com/users/dickeyxxx/events{/privacy}","received_events_url":"https://api.github.com/users/dickeyxxx/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T21:18:23Z","updated_at":"2015-09-24T21:18:23Z","body":"sorry I forgot to update this but I did a bit of work in order to make this work better under bsd. I apologize that it isn't as seamless of an install as I would like, it's something I plan to revisit.\r\n\r\nI made it show a better error message explaining that you need to compile node to `~/.heroku/node-v4*`. Hopefully the instructions there are easy enough to follow. There was a second part to this that would also have required you to setup npm in a specific location inside of that directory. I went ahead and at least automated that.\r\n\r\nI haven't tested this, but I think if you just extract the tarball to `~/.heroku`, and run `make` it will set it up properly."}}