P4help wantedteam-Documentationteam-OSStype: documentation (cleanup)
仓库指标
- Star
- (25,384 star)
- PR 合并指标
- (平均合并 22天 20小时) (30 天内合并 77 个 PR)
描述
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