Skip to content

Commit

Permalink
Disallow windows line ending conversion in tarballs.
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnarFarneback committed May 14, 2020
1 parent 734490f commit 41bcd9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ pkg"registry add UUID"
```
where `UUID` is the UUID of your local registry.

When https://github.com/JuliaLang/Pkg.jl/pull/1804 has been merged and
included in Julia (hopefully for Julia 1.5), you don't need to specify
the UUID,
For Julia 1.5 you won't need to specify the UUID;
```
using Pkg
pkg"registry add"
Expand All @@ -85,7 +83,7 @@ min_time_between_registry_updates = 60
Then you configure this as a storage server for
[PkgServer](https://github.com/JuliaPackaging/PkgServer.jl). Adding
your local registry is done as above after you have pointed
"JULIA_PKG_SERVER" to your PkgServer instance.
`JULIA_PKG_SERVER` to your PkgServer instance.

## Configuration Variables
* `host`: The host name the server will listen to.
Expand Down
5 changes: 3 additions & 2 deletions src/gitserver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ function get_resource_from_storage_server!(config, server::GitStorageServer,
@info "Unknown resource $(parts[1])"
return false
end

tar = read(`$git archive $(hash)`)

# Do not allow git on windows to convert line endings in the tarball.
tar = read(`$git -c core.autocrlf=false archive $(hash)`)
gzip = transcode(GzipCompressor, tar)
write(io, gzip)
close(io)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using LocalPackageServer: fetch, GitStorageServer, Config

const TEST_GITCONFIG = Dict(
"user.name" => "LocalRegistryTests",
"user.email" => "[email protected]",
"user.email" => "[email protected]"
)

# Hook into the LocalRegistry testing infrastructure.
Expand Down

0 comments on commit 41bcd9f

Please sign in to comment.