Skip to content

Commit

Permalink
Space out the arguments passed to 7zip
Browse files Browse the repository at this point in the history
Fixes #340
  • Loading branch information
ararslan committed Dec 6, 2017
1 parent dbba2bd commit 591c242
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BinDeps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ if Compat.Sys.iswindows()
function unpack_cmd(file,directory,extension,secondary_extension)
if ((extension == ".Z" || extension == ".gz" || extension == ".xz" || extension == ".bz2") &&
secondary_extension == ".tar") || extension == ".tgz" || extension == ".tbz"
return pipeline(`$exe7z x $file -y -so`, `$exe7z x -si -y -ttar -o$directory`)
return pipeline(`$exe7z x $file -y -so`, `$exe7z x -si -y -ttar -o $directory`)
elseif (extension == ".zip" || extension == ".7z" || extension == ".tar" ||
(extension == ".exe" && secondary_extension == ".7z"))
return (`$exe7z x $file -y -o$directory`)
return (`$exe7z x $file -y -o $directory`)
end
error("I don't know how to unpack $file")
end
Expand Down
7 changes: 7 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ let gv = glibc_version()
@test gv === nothing
end
end

if Compat.Sys.iswindows()
file = "C:\\junk.zip"
dir = "D:\\junk"
@test BinDeps.unpack_cmd(file, dir, ".zip", "") ==
`$(joinpath(JULIA_HOME, "7z.exe")) -x $file -y -o $dir`
end

0 comments on commit 591c242

Please sign in to comment.