Commit 21b63e6
authored
Fix open-uri call (#319)
Without this fix downloading will fail like:
Host OS... linux
Attempting to download Arduino 0.13.0 package with open-uribundler: failed to load command: arduino_ci.rb (/.../vendor/bundle/ruby/3.0.0/bin/arduino_ci.rb)
/.../arduino_ci/lib/arduino_ci/arduino_downloader.rb:111:in `initialize': No such file or directory @ rb_sysopen - https://github.com/arduino/arduino-cli/releases/download/0.13.0/arduino-cli_0.13.0_Linux_64bit.tar.gz (Errno::ENOENT)
and when running through trace the log gives:
access("/usr/bin/tar", X_OK) = 0
newfstatat(AT_FDCWD, "/usr/bin/tar", {st_mode=S_IFREG|0755, st_size=527464, ...}, 0) = 0
newfstatat(AT_FDCWD, "arduino-cli_0.13.0_Linux_64bit.tar.gz", 0x7fff95f8caa0, 0) = -1 ENOENT (No such file or directory)
write(1, "Attempting to download Arduino 0.13.0 package with open-uri", 59) = 59
openat(AT_FDCWD, "https://github.com/arduino/arduino-cli/releases/download/0.13.0/arduino-cli_0.13.0_Linux_64bit.tar.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
so obviously the bare open call is mapped to a filesystem open call.
The gem 'open-uri' is referenced earlier in the file and is obviously
the intended target. https://github.com/ruby/open-uri documents the API
to be URI.open, and substituting with that made downloading work.1 parent 3d12bb7 commit 21b63e6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
0 commit comments