Skip to content

Commit

Permalink
Change the cp system command used for Windows
Browse files Browse the repository at this point in the history
In Julia 1.5.3 the invalid command was causing terminal display issues
in Windows Cmd and PowerShell terminals.
  • Loading branch information
daniel-thom committed Mar 9, 2021
1 parent 34940bd commit 5698695
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/utils/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,10 @@ get_type_from_strings(module_name, type) = getfield(get_module(module_name), Sym
# This function is used instead of cp given
# https://github.com/JuliaLang/julia/issues/30723
function copy_file(src::AbstractString, dst::AbstractString)
try
if Sys.iswindows()
run(`cmd /c copy /Y $(src) $(dst)`)
else
run(`cp -f $(src) $(dst)`)
catch e
if Sys.iswindows()
run(`cmd /c copy /Y $(src) $(dst)`)
else
rethrow()
end
end
return
end
Expand Down

0 comments on commit 5698695

Please sign in to comment.