heroku / heroku-repo

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

Heroku purge_cache - Bad file descriptor error #43

Closed KOlowoyeye closed 8 years ago

KOlowoyeye commented 8 years ago

I started getting this error today after updating the plugin and was able to reproduce it on two other machines. I was able to run the command by reverting repo.rb locally to commit 82082fe.

Heroku client output:

 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       Bad file descriptor (Errno::EBADF)
    Command:     heroku repo:purge_cache -a appName
    Plugins:     heroku-repo
    Version:     heroku/toolbelt/3.42.15 (i386-mingw32) ruby/1.9.3
    Error ID:    6c39b61fb3e9421c9e64a8b56fd1a2c7

Error file output:

Heroku client internal error.
Bad file descriptor
C:/Users/Me/.heroku/plugins/heroku-repo/lib/heroku/command/repo.rb:145:in `read_nonblock'
C:/Users/Me/.heroku/plugins/heroku-repo/lib/heroku/command/repo.rb:145:in `block (2 levels) in run'
C:/Users/Me/.heroku/plugins/heroku-repo/lib/heroku/command/repo.rb:140:in `each'
C:/Users/Me/.heroku/plugins/heroku-repo/lib/heroku/command/repo.rb:140:in `block in run'
C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/1.9.1/open3.rb:208:in `popen_run'
C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/1.9.1/open3.rb:90:in `popen3'
C:/Users/Me/.heroku/plugins/heroku-repo/lib/heroku/command/repo.rb:134:in `run'
C:/Users/Me/.heroku/plugins/heroku-repo/lib/heroku/command/repo.rb:37:in `purge_cache'
C:/Program Files (x86)/Heroku/lib/heroku/command.rb:212:in `run'
C:/Program Files (x86)/Heroku/lib/heroku/cli.rb:29:in `start'
C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'
tt commented 8 years ago

Can you take a look, @dickeyxxx?

jdx commented 8 years ago

this will fix it @tt https://github.com/heroku/heroku-repo/pull/44

jdx commented 8 years ago

can you update and try again?

KOlowoyeye commented 8 years ago

@dickeyxxx, I just updated and it works great. Thanks for the fix. :+1: