Commit 2a65897f authored by MichelJuillard's avatar MichelJuillard
Browse files

fix command line options handling

parent ed8cb604
......@@ -4,14 +4,12 @@ function dynare_preprocess(modfilename, args)
dynare_args = [basename(modfilename), "language=julia", "output=third", "json=compute"]
offset = 0
for a in args
if occursin(r"^output=", a)
deleteat!(dynare_args, 3)
offset = 1
elseif occursin(r"^json=", a)
deleteat!(dynare_args, 4 - offset)
astring = string(a)
if (!occursin(r"^output=", astring)
&& !occursin(r"^json=", astring))
push!(dynare_args, astring)
append!(dynare_args, args)
run_dynare(modfilename, dynare_args)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment