Skip to content

Commit

Permalink
Merge pull request #203 from daniel-thom/fix-cp-for-windows
Browse files Browse the repository at this point in the history
Change the cp system command used for Windows
  • Loading branch information
daniel-thom authored Mar 9, 2021
2 parents 34940bd + 5698695 commit 55c67f6
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 55c67f6

Please sign in to comment.