heroku / heroku-repo

Plugin for heroku CLI that can manipulate the repo
MIT License
686 stars 111 forks source link

Unable to install on Windows under the mingw64/msys2 #49

Closed yukoff closed 8 years ago

yukoff commented 8 years ago

An attemp to install this plugin fails with following error:

 ▸    npm ERR! node v5.7.0
 ▸    npm ERR! npm  v3.3.10
 ▸    npm ERR! code EISDIR
 ▸    npm ERR! errno -21
 ▸    npm ERR! syscall read
 ▸
 ▸    npm ERR! eisdir EISDIR: illegal operation on a directory, read
 ▸    npm ERR! eisdir This is most likely not a problem with npm itself
 ▸    npm ERR! eisdir and is related to npm not being able to find a package.json in
 ▸    npm ERR! eisdir a package you are trying to install.

npm-debug.log.zip

yukoff commented 8 years ago

A quick looking shows that the plugin wasn't migrated to npm

dmathieu commented 8 years ago

Note that you can always install this plugin with the following command:

heroku plugins:install https://github.com/heroku/heroku-repo.git

yukoff commented 8 years ago

Yes, I clearly know it (and it is clearly stated in the README). Sorry, I didn't mentioned environment information - the problem occures with heroku toolbelt for windows with the mingw/msys2 (mingw64 to be more precise)

$ uname -a
MSYS_NT-10.0 yk-nb-home 2.3.0(0.290/5/3) 2015-09-15 09:39 x86_64 Msys

$ heroku --version
heroku/toolbelt/3.42.38 (i386-mingw32) ruby/1.9.3
heroku-cli/4.27.24-6c4efbe (386-windows) go1.6
=== Installed Plugins
git.exe.stackdump
heroku-apps@1.2.4
heroku-cli-addons@0.2.1
heroku-fork@4.1.1
heroku-git@2.4.5
heroku-local@4.1.7
heroku-orgs@1.0.1
heroku-pipelines@1.0.2
heroku-run@2.9.2
heroku-spaces@2.0.14
heroku-status@2.1.0

I'm trying to narrow down the problem, but what I see:

$ heroku plugins:install https://github.com/heroku/heroku-repo.git
Installing https://github.com/yukoff/heroku-repo.git... failed
 !    Could not install heroku-repo. Please check the URL and try again.
$ uname -rmo
3.16.7-32-default x86_64 GNU/Linux

$ lsb-release -rdi
Distributor ID: openSUSE project
Description:    openSUSE 13.2 (Harlequin) (x86_64)
Release:        13.2

$ heroku plugins:install https://github.com/heroku/heroku-repo.git
Installing https://github.com/heroku/heroku-repo.git... done

$ heroku --version
heroku-toolbelt/3.42.38 (x86_64-linux-gnu) ruby/2.1.3
heroku-cli/4.27.24-6c4efbe (amd64-linux) go1.6
=== Installed Plugins
heroku-apps@1.2.4
heroku-cli-addons@0.2.1
heroku-fork@4.1.1
heroku-git@2.4.5
heroku-local@4.1.7
heroku-orgs@1.0.1
heroku-pipelines@1.0.2
heroku-repo
heroku-run@2.9.2
heroku-spaces@2.0.14
heroku-status@2.1.0
$ uname -a
MINGW32_NT-6.2 YK-NB-HOME 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys

$ heroku --version
heroku/toolbelt/3.42.38 (i386-mingw32) ruby/1.9.3
heroku-cli/4.27.24-6c4efbe (386-windows) go1.6
=== Installed Plugins
heroku-apps@1.2.4
heroku-cli-addons@0.2.1
heroku-fork@4.1.1
heroku-git@2.4.5
heroku-local@4.1.7
heroku-orgs@1.0.1
heroku-pipelines@1.0.2
heroku-repo
heroku-run@2.9.2
heroku-spaces@2.0.14
heroku-status@2.1.0

I have a feeling that in the end the issue won't have any relation to heroku-repo :)

jdx commented 8 years ago

something on your machine is modifying the url, probably in your .gitconfig. (see how it is trying to install https://github.com/yukoff/heroku-repo.git)

yukoff commented 8 years ago

Interesting, the problem was caused by crashed git underneath (I spot ~/.heroku/plugins/git.exe.stackdump). GODE_DEBUG=info have effect ony if installation is done the heroku plugins:install owner/repo way, so resulted npm-debug.log is in attach npm-debug.log.txt npm-debug.log.zip

Using either non-msys2 bundled git or non-heroku shipped ruby (2.3.0 in my case) allows to install it. Seems there's another problem with repo:reset command (seems repo created this way isn't usable), but I'd like to check this deeper and file another issue if the problem's not on my side.

jdx commented 8 years ago

You can't install plugins like that, you have to use the full url. Try moving your .gitconfig, I bet that's the problem.

yukoff commented 8 years ago

Thanks @dickeyxxx, in my case the reason of failing installation with the full url was crashing git - switching to the binary from git-scm.com allowed to complete installation. I've mentioned the heroku plugins:install owner/repo attempts just to give the whole picture of steps taken (well, and because heroku help plugins:install gives corresponding example ;)

  Example:
  $ heroku plugins:install dickeyxxx/heroku-production-status
yukoff commented 8 years ago

Thanks everyone for your time, I'm closing this one as the problem tracked down/solved.