inukshuk / anystyle-cli

AnyStyle Command Line Interface
BSD 2-Clause "Simplified" License
57 stars 8 forks source link

anystyle-cli fails to open file in Ruby 2.7.7 #16

Closed jfelixhe closed 1 year ago

jfelixhe commented 1 year ago

Scenario:

ruby --version
ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [x64-mingw32]

Apparently, data is not correctly read from file, instead it appears to try to use the file location as URL. The outcome to previous command was:

[
  {
    "url": [
      "D:/data/<a_long_path...>/_citations.txt"
    ],
    "type": null
  }
]

Also, I was able to confirm that the parser works fine if directly called from the Interactive Ruby environment.

inukshuk commented 1 year ago

Oh, that's an issue in the latest version. For security reasons, we stopped opening paths automatically, so the CLI tool must open the file now.

We'll push an update in the coming days; meanwhile you can just use the previous version (on Ruby 2.7 you're not missing any relevant updates).

inukshuk commented 1 year ago

Should be fixed in 1.4.1