jprichardson / jprichardson/cross-zip-cli

When zipping a directory, the zip file is always created in its parent directory regardless of the desired path

Open
#4 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
24
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Sample package.json:

{
  "name": "zip-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "cross-zip ./parent/child/grandchild output.zip"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "cross-zip-cli": "^1.0.0"
  }
}

Make a nested directory structure:

mkdir -p parent/child/grandchild
echo "foo" > parent/child/grandchild/data.txt

Run the script:

$ npm run test

> zip-test@1.0.0 test /Users/sepiaj/ws/zip-test
> cross-zip ./parent/child/grandchild ./output.zip

Expected result: The zip file appears in the CWD (or in this case, the root of the project), as a sibling to package.json.

Actual result: The zip file shows up in parent/child/.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Reproduce the issue using the package.json script and the nested parent/child/grandchild directory structure shown in the report. Start at the cross-zip CLI entry point and trace how the input directory and output.zip paths are resolved; done means the archive is created in the current working directory as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.