From 2d5226f1a9843d9ba3068aa33cdaae2e0d790b02 Mon Sep 17 00:00:00 2001 From: HUMORCE Date: Thu, 11 Jan 2024 06:14:12 +0800 Subject: [PATCH] android-clt@11076708: Fix persistence (Close #5412) --- bucket/android-clt.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bucket/android-clt.json b/bucket/android-clt.json index 97d1207f3e..4ce3ddab65 100644 --- a/bucket/android-clt.json +++ b/bucket/android-clt.json @@ -15,14 +15,15 @@ "pre_install": [ "Rename-Item \"$dir\\cmdline-tools\\cmdline-tools\" -NewName 'latest'", "# For `env_add_path`:", - "ensure \"$dir\\platform-tools\"" + "ensure \"$dir\\platform-tools\" | Out-Null" ], "post_install": [ "# Persistence", "Get-ChildItem \"$persist_dir\\cmdline-tools\" -Exclude 'latest' | Move-Item -Destination \"$dir\\cmdline-tools\" -Force", "@('emulator', 'ndk-bundle', 'platform-tools', 'tools') | ForEach-Object {", " if (Test-Path \"$persist_dir\\$_\") {", - " Move-Item \"$persist_dir\\$_\" \"$dir\" -Force", + " ensure \"$dir\\$_\" | Out-Null", + " Move-Item \"$persist_dir\\$_\\*\" \"$dir\\$_\" -Force", " }", "}", "if (!(Get-Command 'java' -ErrorAction SilentlyContinue)) {",