gemini-cli - ✅(Solved) Fix Tests creating files .gitignore and .geminiingore files under packages/core [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25003Fetched 2026-04-10 03:45:36
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Assignees
Timeline (top)
labeled ×2assigned ×1cross-referenced ×1unlabeled ×1

Fix Action

Fixed

PR fix notes

PR #25005: Move sandbox manager tests to use a test directory and to clean up after

Description (problem / solution / changelog)

Summary

Modifies the sandbox manager tests to use a temporary test directory and cleanup afterwards.

Details

This fixes the issue where the sandbox manager integration tests are orphaning files packages/core/.gitignore and packages/core/.geminiignore during a test run.

Related Issues

Fixes #25003

How to Validate

npm run test without change will result in these files. npm run test with this change will no longer drop these files.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

Changed files

  • packages/core/src/services/sandboxManager.integration.test.ts (modified, +17/-5)

Code Example

> /about
# paste output here
RAW_BUFFERClick to expand / collapse

What happened?

When running tests packages/core/.gitignore and packages/core/.geminiingore are created. These files are then orphaned so that they remain in the developer's source tree.

What did you expect to happen?

Tests should not be using the source directory for writing temporary test files.

Client information

<details> <summary>Client Information</summary>

Run gemini to enter the interactive CLI, then run the /about command.

> /about
# paste output here
</details>

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The issue can be fixed by configuring the test environment to use a temporary directory for writing test files instead of the source directory.

Guidance

  • Identify the test configuration that is causing the creation of packages/core/.gitignore and packages/core/.geminiingore files in the source directory.
  • Update the test configuration to use a temporary directory for test files, ensuring that these files are properly cleaned up after the tests are completed.
  • Verify that the test environment is correctly configured by running the tests and checking that the temporary files are not created in the source directory.
  • Consider setting up a tmp or test_tmp directory in the project root to store temporary test files.

Example

No specific code snippet can be provided without more information about the test framework and configuration being used.

Notes

The exact solution will depend on the specific test framework and configuration being used, which is not provided in the issue description.

Recommendation

Apply workaround: Update the test configuration to use a temporary directory for test files, as this will prevent the creation of orphaned files in the source directory without requiring any external upgrades or changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - ✅(Solved) Fix Tests creating files .gitignore and .geminiingore files under packages/core [1 pull requests, 1 participants]