fix: only clean yarn cache/telemetry, not config files
This commit is contained in:
1 parent
7e08280539
commit
bdf291466e
1 file changed
+1
-3
+1
-3
@@ -2318,12 +2318,10 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
|
|||||||
# Clean global Yarn 4.x cache with stale patch references (keep yarn releases)
|
# Clean global Yarn 4.x cache with stale patch references (keep yarn releases)
|
||||||
yarn_global = Path("/root/.yarn")
|
yarn_global = Path("/root/.yarn")
|
||||||
if yarn_global.exists():
|
if yarn_global.exists():
|
||||||
for d in ["cache", "telemetry", "settings.yml", "yarnrc.yml"]:
|
for d in ["cache", "telemetry"]:
|
||||||
p = yarn_global / d
|
p = yarn_global / d
|
||||||
if p.is_dir():
|
if p.is_dir():
|
||||||
shutil.rmtree(p, ignore_errors=True)
|
shutil.rmtree(p, ignore_errors=True)
|
||||||
elif p.is_file():
|
|
||||||
p.unlink(missing_ok=True)
|
|
||||||
for g in [Path(os.path.expanduser("~/.config/yarn"))]:
|
for g in [Path(os.path.expanduser("~/.config/yarn"))]:
|
||||||
if g.exists():
|
if g.exists():
|
||||||
if g.is_dir():
|
if g.is_dir():
|
||||||
|
|||||||
Reference in new issue
Block a user