Skip to content

Commit

Permalink
choco: fix configuration file replacement regex
Browse files Browse the repository at this point in the history
Closes #49.

Signed-off-by: Jip J. Dekker <[email protected]>
  • Loading branch information
Dekker1 committed Nov 3, 2023
1 parent 42b6a8e commit 1b63be1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Formula/choco.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def install
(share / "minizinc").install "src/main/minizinc/mzn_lib" => "choco"

inreplace "src/main/minizinc/choco.msc" do |s|
s.gsub!(/"executable":\s+"[^"]*"/, "\"executable\": \"#{bin}/fzn-choco\"")
s.gsub!(/"mznlib":\s+"[^"]*"/, "\"mznlib\": \"#{share}/minizinc/choco\"")
s.gsub!(/"executable"\s*:\s*"[^"]*"/, "\"executable\": \"#{bin}/fzn-choco\"")
s.gsub!(/"mznlib"\s*:\s*"[^"]*"/, "\"mznlib\": \"#{share}/minizinc/choco\"")
end
(share / "minizinc/solvers").mkpath
(share / "minizinc/solvers").install "src/main/minizinc/choco.msc"
Expand Down

0 comments on commit 1b63be1

Please sign in to comment.