Skip to content

Delete downloaded archive after extracting it during install #1090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

darktohka
Copy link

Description:

During a Python / Pypy / GraalPy installation, after the downloaded archive is extracted, it is not deleted. This leads to the archive taking up disk space, and often mistakenly getting archived together with the Python version.

This pull request ensures the downloaded archives are deleted after they are extracted and no longer needed.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@Copilot Copilot AI review requested due to automatic review settings April 21, 2025 10:02
@darktohka darktohka requested a review from a team as a code owner April 21, 2025 10:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR deletes the downloaded Python, PyPy, and GraalPy archives after extraction during installation to prevent unnecessary disk usage and incorrect archiving of the archive files.

  • Removed downloaded archive after extraction in install-python.ts
  • Removed downloaded archive after extraction in install-pypy.ts
  • Removed downloaded archive after extraction in install-graalpy.ts

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/install-python.ts Added rm import and removed the downloaded archive after extraction
src/install-pypy.ts Added rm import and removed the downloaded archive after extraction
src/install-graalpy.ts Added rm import and removed the downloaded archive after extraction
Comments suppressed due to low confidence (1)

src/install-python.ts:143

  • [nitpick] Consider updating the log message to be consistent with the other installers (e.g., use 'Deleting downloaded archive...' as in install-pypy.ts and install-graalpy.ts).
core.info('Delete downloaded archive');

@darktohka
Copy link
Author

Comments suppressed due to low confidence (1)

src/install-python.ts:143

* [nitpick] Consider updating the log message to be consistent with the other installers (e.g., use 'Deleting downloaded archive...' as in install-pypy.ts and install-graalpy.ts).
core.info('Delete downloaded archive');

Since the install-python.ts workflow follows this convention (Download from {url}, Extract downloaded archive, Execute installation script) I decided to keep using the same convention for that workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant