Heh, terseness can be overrated ;)
Time to dive deeper down the rabbit hole as the go exec-based automated
version fails while a manual cmd line version works. Could have nothing to
do with go and turn out that cmd.exe is the source of the shenanigans
because the `gem` command is actually a `gem.bat` that wraps a call to the
appropriate `[j]ruby.exe` with cmd line args. A lot of moving
pieces...interested to see if the same failures in a zsh/bash environment.
Any pointers to go goodies that may help debugging highly appreciated.
=== FAIL ===
C:\>uru gem up multi_json treetop --verbose
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Client VM
1.7.0_21-b11 +indy [Windows 7-x86]
---> unable to run `gem up multi_json treetop --verbose`
--- returned error message ---
exit status 1
--- combined child output ---
Updating installed gems
HEAD
http://rubygems.org/specs.4.8.gz302 Moved Temporarily
HEAD
http://production.s3.rubygems.org/specs.4.8.gz304 Not Modified
Updating multi_json
Installing gem multi_json-1.7.6
ERROR: While executing gem ... (Errno::EIO)
Input/output error - C:\
ruby 2.0.0p201 (2013-06-04 revision 41056) [i386-mingw32]
---> unable to run `gem up multi_json treetop --verbose`
--- returned error message ---
exit status 1
--- combined child output ---
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory -
Updating installed gems
HEAD
http://rubygems.org/specs.4.8.gz302 Moved Temporarily
HEAD
http://production.s3.rubygems.org/specs.4.8.gz304 Not Modified
Updating multi_json
Installing gem multi_json-1.7.6
ruby 1.9.3p430 (2013-05-15 revision 40754) [i386-mingw32]
---> unable to run `gem up multi_json treetop --verbose`
--- returned error message ---
exit status 1
--- combined child output ---
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory -
Updating installed gems
HEAD
http://rubygems.org/specs.4.8.gz302 Moved Temporarily
HEAD
http://production.s3.rubygems.org/specs.4.8.gz304 Not Modified
Updating multi_json
Installing gem multi_json-1.7.6
=== WORKING ===
C:\>gem up multi_json treetop --verbose
Updating installed gems
HEAD
http://rubygems.org/specs.4.8.gz302 Moved Temporarily
HEAD
http://production.s3.rubygems.org/specs.4.8.gz200 OK
GET
http://rubygems.org/specs.4.8.gz302 Moved Temporarily
GET
http://production.s3.rubygems.org/specs.4.8.gz200 OK
Updating multi_json
Installing gem multi_json-1.7.6
Downloading gem multi_json-1.7.6.gem
GET
http://rubygems.org/gems/multi_json-1.7.6.gem302 Moved Temporarily
GET
http://production.cf.rubygems.org/gems/multi_json-1.7.6.gemFetching: multi_json-1.7.6.gem (100%)
200 OK
...
Successfully installed multi_json-1.7.6
Updating treetop
HEAD
http://rubygems.org/latest_specs.4.8.gz302 Moved Temporarily
HEAD
http://production.s3.rubygems.org/latest_specs.4.8.gz200 OK
GET
http://rubygems.org/latest_specs.4.8.gz302 Moved Temporarily
GET
http://production.s3.rubygems.org/latest_specs.4.8.gz200 OK
Installing gem treetop-1.4.14
Downloading gem treetop-1.4.14.gem
GET
http://rubygems.org/gems/treetop-1.4.14.gem302 Moved Temporarily
GET
http://production.cf.rubygems.org/gems/treetop-1.4.14.gemFetching: treetop-1.4.14.gem (100%)
200 OK
...
Creating executable as 'tt.exe'
Installed C:/ruby193/bin/tt.exe executable
Successfully installed treetop-1.4.14
Gems updated: multi_json treetop
On Monday, June 3, 2013 5:46:53 PM UTC-4, Dave Cheney wrote:Try CombinedOutput, you're throwing away stderr which probably has some
thing important to tell you.
On 04/06/2013, at 7:40, jon.f...@gmail.com <javascript:> wrote:
During a recent trip with a slow mobile connection, this code from a hobby
project (a go-based linux/windows/osx ruby switcher/runner)
https://bitbucket.org/jonforums/uru/src/403adb22fb424900afa85b2943926e4a3ff82fd7/command/base.go?at=master#cl-64fails (tested only windows so far) when trying to run an external command
that does network io. The same code works fine on fast connections and I'm
trying to track down the source of this time dependent behavior. Sadly, I
only get to hack on go during brief bouts of lucid free time, but haven't
yet spelunked enough go source to solve the riddle.
Does go's runtime have watchdog-like oversight of things started via the
`exec` package?
Suggested go source locations to continue spelunking? (currently I'm
digging around the obvious "os" and "os/exec" pkg's)
Jon
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.