{"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":3,"created_at":"2015-08-26T20:56:38Z","updated_at":"2015-08-27T20:44:57Z","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/135550641","html_url":"https://github.com/heroku/heroku-cli/issues/57#issuecomment-135550641","issue_url":"https://api.github.com/repos/heroku/heroku-cli/issues/57","id":135550641,"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},"created_at":"2015-08-27T20:44:57Z","updated_at":"2015-08-27T20:44:57Z","body":"If you were to host the binaries yourself, that would solve the problem perfectly. I'd be happy to help build OpenBSD binaries, if that would be useful.\r\n\r\nI believe iojs 3.x will be the last iojs release. It has merged with node now, so the 4.x release will be known as Node again. The alpha release of Node v4 is due in about a week."}}