]> Cypherpunks repositories - gostls13.git/commit
cmd/go: clean -cache -n should not delete cache
authorPaschalis Tsilias <paschalis.tsilias@gmail.com>
Tue, 26 May 2020 14:45:11 +0000 (17:45 +0300)
committerJay Conrod <jayconrod@google.com>
Wed, 27 May 2020 13:37:56 +0000 (13:37 +0000)
commitc0e8e405c02388fb8e7d3bea092f5aa8b19b2ad9
treec430aa25642e6b8954e9b3471da165b79a0773a5
parentb2ce3931d8d34ffe3fbed0d9eed2676d916e5431
cmd/go: clean -cache -n should not delete cache

Uses the `cfg.BuildN` flag to avoid deleting inside the `if cleanCache`
block. Introduces a test in src/cmd/go/testdata/script.

Fixes #39250

Change-Id: I857c441b1d7aa7c68cfd646d6833e6eaca5b18d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/235140
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/clean/clean.go
src/cmd/go/testdata/script/clean_cache_n.txt [new file with mode: 0644]