Skip to content

#2219: Add UnpackCommandlet for extracting already supported archieve Formats - #2334

Open
majesteSil wants to merge 9 commits into
devonfw:mainfrom
majesteSil:feature/issue-2219-add-unpack-commandlet
Open

#2219: Add UnpackCommandlet for extracting already supported archieve Formats #2334
majesteSil wants to merge 9 commits into
devonfw:mainfrom
majesteSil:feature/issue-2219-add-unpack-commandlet

Conversation

@majesteSil

@majesteSil majesteSil commented Aug 14, 2026

Copy link
Copy Markdown

This PR fixes #2219

Adds a new "unpack" commandlet that extracts archive files into a target directory. The commandlet supports ZIP, TAR, TAR.GZ, TAR.BZ2, 7Z, JAR (cross-platform) and notes platform-specific formats like MSI/DMG/PKG. The commandlet is registered in the commandlet manager and covered by unit tests.

Implemented changes:

  • Modified: CommandletManagerImpl (registers new commandlet)
  • Added: UnpackCommandlet (new commandlet implementation)
  • Added: UnpackCommandletTest (unit tests)

Testing instructions

Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:

  • to test the Commandlet first check the branch/ and set your local env with the build-local-dev.sh script, so you have all the latest changes
  • then go ahead make sure you have an archieve of the supported type with the right Operating System (tar on Linux ...) somes tests archieve are available in the test/ressources directory under executable_and_non_executable.$archive_format
  • then try ide unpack $archive (this will unpaack your archive in the current working DIrectory)
  • then try ide unpack $archie target $targetDir (this will unpack your archive to the specified target directory)

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@majesteSil majesteSil added enhancement New feature or request commandlet ide sub-command unpack logic to unpack archives (tar, zip, tgz, zbz2, msi, dmg, etc.) labels Aug 14, 2026
@samuelkos17 samuelkos17 moved this from 🆕 New to Team Review in IDEasy board Aug 14, 2026
@coveralls

coveralls commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 32111757951

Warning

No base build found for commit 31dabbf on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 72.932%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 17575
Covered Lines: 13367
Line Coverage: 76.06%
Relevant Branches: 7765
Covered Branches: 5114
Branch Coverage: 65.86%
Branches in Coverage %: Yes
Coverage Strength: 3.23 hits per line

💛 - Coveralls

@samuelkos17 samuelkos17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on adding an unpack commandlet to IDEasy! I've tested the unpacking and it works, however the target parameter is not working. So I still have a few suggestions, mainly concerning the target parameter not working and wrong descriptions.
Also your commits have an inconsistent link to the issue (some falsely point to #2298). This should be fixed aswell.

Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/UnpackCommandlet.java Outdated
Comment thread cli/src/main/resources/nls/Help.properties Outdated
Comment thread cli/src/main/resources/nls/Help.properties Outdated
Comment thread cli/src/main/resources/nls/Help_de.properties Outdated
Comment thread cli/src/main/resources/nls/Help_de.properties Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an E2E test for CLI parsing here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuelkos17 schaue bitte nochmal nach, ob es jetzt passend ist

Comment thread CHANGELOG.adoc Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commandlet ide sub-command enhancement New feature or request unpack logic to unpack archives (tar, zip, tgz, zbz2, msi, dmg, etc.)

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Add unpack commandlet

5 participants