You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I apologize if this isn't the correct place to file this - the issue might be upstream, downstream, or my own error, just looking for guidance. I'm trying to make a cask to install some software that I frequently use, but keep getting an argument out of range error when trying to install. Here's the cask code:
cask "olex2" do
version "1.5"
sha256 :no_check
url "https://secure.olex2.org/olex2-distro/olex2-#{version}.app.dmg",
verified: "secure.olex2.org/"
name "olex2"
desc "desc."
homepage "https://www.olexsys.org/olex2/"
app "olex2.app"
end
I can curl the dmg fine with the url, which makes me think that it's not an issue with where it's hosted. Instead, the error seems to occur in the resolve_url_basename_time_file_size function when it's checking the last-modified header (I think?) of the dmg. curl --head <url> shows Last-Modified: 2/29/24 11:29 AM for the last modified date header, maybe it's a non-standard format which the resolve_url_basename_time_file_size function can't parse and then fails? Or a leap day issue? I feel like the expected behavior is for it not to fail even if the dmg has an issue with the last-modified header, but I could just be making a really simple mistake here and I'm not very familiar with ruby.
Your system is ready to brew.
HOMEBREW_VERSION: 4.3.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: e8430b25a1d1321f32e5093d62b57b5cb7cfb3c3
Last commit: 7 days ago
Core tap JSON: 23 Jun 16:23 UTC
Core cask tap JSON: 23 Jun 16:23 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 3.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.3/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-x86_64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Output of brew tap
N/A
The text was updated successfully, but these errors were encountered:
Since 2/29/24 11:29 AM does not match this format (or, it seems, any standard format), Time.parse cannot necessarily parse it per the Time.parse docs:
If the input string does not match valid formats strictly, you may get a cryptic result
In my opinion, the issue is that secure.olex2.org is sending an invalid header value, and not really a Homebrew bug. However, maybe we should not error in this case and simply pretend as if no Last-Modified header was passed?
Verification
--force
.brew update-reset && brew update
and retried my command.brew doctor
, fixed as many issues as possible and retried my command.Description of issue
First, I apologize if this isn't the correct place to file this - the issue might be upstream, downstream, or my own error, just looking for guidance. I'm trying to make a cask to install some software that I frequently use, but keep getting an
argument out of range
error when trying to install. Here's the cask code:I can curl the dmg fine with the url, which makes me think that it's not an issue with where it's hosted. Instead, the error seems to occur in the
resolve_url_basename_time_file_size
function when it's checking the last-modified header (I think?) of the dmg.curl --head <url>
showsLast-Modified: 2/29/24 11:29 AM
for the last modified date header, maybe it's a non-standard format which theresolve_url_basename_time_file_size
function can't parse and then fails? Or a leap day issue? I feel like the expected behavior is for it not to fail even if the dmg has an issue with the last-modified header, but I could just be making a really simple mistake here and I'm not very familiar with ruby.Command that failed
brew install --cask ./olex2.rb
Output of command with
--verbose --debug
Output of
brew doctor
andbrew config
Output of
brew tap
The text was updated successfully, but these errors were encountered: