P4help wantedteam-Documentationteam-OSStype: documentation (cleanup)
Repository metrics
- Stars
- (25,384 stars)
- PR merge metrics
- (Avg merge 22d 20h) (77 merged PRs in 30d)
Description
Description of the problem / feature request:
When a binary run by bazel run generates files in its working directory (i.e. its runfiles), they stay for the next run.
I would like them to be cleaned at each bazel run invocation. Right now I need to bazel clean before. A flag, such as bazel run --clean_runfiles is another option.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
If target //:foo looks like this pseudo code:
if fileExists "a"
then echo "Exists"
else echo "Does not exist"
createFile "a"
The following:
```bazel clean; bazel run //:foo; bazel run //:foo` will print "Do not exists" followed by "Exists".
What operating system are you running Bazel on?
Linux
What's the output of bazel info release?
release 4.1.0- (@non-git)
If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.
NixOS