Skip to content

Conversation

hlovdal
Copy link
Contributor

@hlovdal hlovdal commented Jan 27, 2022

This fixes the issue where attempting to download releases from https://github.com/arduino/arduino-cli/releases/download/ fails.

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.
@jgfoster jgfoster merged commit 21b63e6 into Arduino-CI:master Jan 27, 2022
@jgfoster
Copy link
Member

Very nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants