Skip to content

Commit

Permalink
Fix Cura version regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Oct 5, 2024
1 parent c4ea587 commit 4590bcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tasks/cura.rake
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ MOONRAKER_INSTANCES = {
task :cura => [:'brew:casks_and_formulae'] do
cura_version = JSON.parse(
capture('brew', 'info', '--json=v2', '--cask', 'ultimaker-cura'),
).fetch('casks').fetch(0).fetch('installed')
cura_version = cura_version.match(/\A(\d+\.\d+)\.\d+\Z/)[1]
).fetch('casks').fetch(0).fetch('installed')[/\A(\d+\.\d+)\.\d+/, 1]
raise "Failed to get Cura version." if cura_version.nil?

Check failure on line 29 in lib/tasks/cura.rake

View workflow job for this annotation

GitHub Actions / rubocop

[Style/StringLiterals] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

config_dir = Pathname("~/Library/Application Support/cura/#{cura_version}").expand_path
config_dir.mkpath
Expand Down

0 comments on commit 4590bcd

Please sign in to comment.