Skip to content

Commit

Permalink
Merge pull request #277 from nhz2/fix-copy_tutorial-on-windows
Browse files Browse the repository at this point in the history
Fix tutorial path string escaping
  • Loading branch information
cortner authored Oct 22, 2024
2 parents 1d633f0 + b609623 commit 03bd5a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ext_tests/tutorial/run_tutorial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ appath = abspath(joinpath(@__DIR__(), "..", ".."))
setuptutorial = """
begin
using Pkg;
Pkg.develop(; path = \"$appath\");
Pkg.develop(; path = $(repr(appath)));
using ACEpotentials;
ACEpotentials.copy_tutorial();
end
Expand Down
2 changes: 1 addition & 1 deletion src/json_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function copy_tutorial(dest = pwd())
orig = joinpath(path, tutfile)
dest_jl = joinpath(dest, tutfile)
cp(orig, dest_jl)
jl_script = "using Literate; Literate.notebook(\"$dest_jl\", \"$dest\"; config = Dict(\"execute\" => false))"
jl_script = "using Literate; Literate.notebook($(repr(dest_jl)), $(repr(dest)); config = Dict(\"execute\" => false))"
run(`$julia_cmd --project=$dest -e $jl_script`)
rm(dest_jl)
end
Expand Down
6 changes: 3 additions & 3 deletions test/test_json.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ run(`cp $datafile $(tmpproj*"/")`);
prep_proj = """
begin
using Pkg;
Pkg.activate(\"$tmpproj\");
Pkg.develop(; path = \"$ap_dir\");
Pkg.activate($(repr(tmpproj)));
Pkg.develop(; path = $(repr(ap_dir)));
using ACEpotentials;
ACEpotentials.copy_runfit(\"$tmpproj\");
ACEpotentials.copy_runfit($(repr(tmpproj)));
end
"""
run(`$julia_cmd -e $prep_proj`)
Expand Down

0 comments on commit 03bd5a9

Please sign in to comment.