Allow extraction to existing folders

Open
#219 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start by locating the pget extraction path used by the -x option and the check that reports "destination / already exists"; the issue names no files or tests. Done means extraction can target an existing directory such as /, while the existing download-and-extract behavior continues to work.

Written by the indexing model from the issue text.

Description

I was using pget to download a tarball and extract to the root of my container / with the following command:

pget "https://storage.googleapis.com/xxx/xxx/xxx.tar.gz" / -x

I receive the following error message:

Error: destination / already exists

Would the pget team be amenable to me making the change that allows extraction to already existing directories? I currently I work around this by doing the following:

pget "https://storage.googleapis.com/xxx/xxx/xxx.tar.gz" "/tmp/usrfile.tar.gz"
tar xf "/tmp/usrfile.tar.gz" -C /
rm "/tmp/usrfile.tar.gz"
Dominant language
Go
Stars
151
Forks
7
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from replicate/pget

All issues in replicate/pget

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.