bug: forge test
deletes any existing snapshots
directory by design #9477
Closed
Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (e5dbb7a 2024-12-03T00:25:01.006590000Z)
What command(s) is the bug in?
forge test
Operating System
macOS (Apple Silicon)
Describe the bug
Running forge test
in our repository seems to delete any existing "snapshots" folder if it already exists. We use a folder called "snapshots" to contain all of our snapshots, so this folder isn't exclusive to forge things. I've gotten around this for now by changing our foundry.toml
to set the configured snapshots
folder to a fake directory.
From a quick glance it looks like this is the source of the issue:
foundry/crates/config/src/lib.rs
Lines 1042 to 1046 in 805d7ce
I haven't checked what this is actually being used for but if I have some time later I might take a stab at a fix.
Metadata
Assignees
Type
Projects
Status
Done
Activity