Skip to content

Commit

Permalink
Merge pull request #378 from grafbase/fork-tar
Browse files Browse the repository at this point in the history
Pull in tar-rs fork to work around startup issue.
  • Loading branch information
fbjork committed May 18, 2023
2 parents 37e3a64 + eb9e17e commit 436aca8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion cli/crates/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ sqlx = { version = "0.6", features = [
strip-ansi-escapes = "0.1"
strum = { version = "0.24", features = ["derive"] }
tantivy = { version = "0.19", default-features = false }
tar = "0.4"
# Temporary change till https://github.com/alexcrichton/tar-rs/pull/319 is release
tar = { git = "https://github.com/obmarg/tar-rs.git", rev = "bffee32190d531c03d806680daebd89cb1544be1" }
tempfile = "3"
thiserror = "1"
tokio = { version = "1", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions cli/crates/server/src/servers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ fn export_embedded_files() -> Result<(), ServerError> {
let reader = GzDecoder::new(ASSETS_GZIP);
let mut archive = tar::Archive::new(reader);
let full_path = &environment.user_dot_grafbase_path;
fs::create_dir_all(full_path)
.and_then(|_| archive.unpack(full_path))
archive
.unpack(full_path)
.map_err(|_| ServerError::WriteFile(full_path.to_string_lossy().into_owned()))?;

if fs::write(&version_path, current_version).is_err() {
Expand Down

0 comments on commit 436aca8

Please sign in to comment.