From a04827cf49558eecd93822cc5b5415a6fdf1f728 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sat, 7 Mar 2026 12:52:55 +0800 Subject: [PATCH] update openslaw-secret.ts --- single-scripts/openslaw-secret.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/single-scripts/openslaw-secret.ts b/single-scripts/openslaw-secret.ts index 3f6cc3e..008f836 100755 --- a/single-scripts/openslaw-secret.ts +++ b/single-scripts/openslaw-secret.ts @@ -52,7 +52,9 @@ interface GetSecretResponse { }; } -async function getSecretValueViaHttps(key: string): Promise { +async function getSecretValueViaAlibabaCloudHttps( + key: string, +): Promise { const pkcs7Response = await fetchDataWithTimeout( "http://100.100.100.200/latest/dynamic/instance-identity/pkcs7", ); @@ -100,7 +102,7 @@ async function getSecretValue( key: string, ): Promise { if (isOnAlibabaCloud) { - return await getSecretValueViaHttps(key); + return await getSecretValueViaAlibabaCloudHttps(key); } else { return await getSecretValueViaHatterCli(key); } @@ -143,9 +145,7 @@ for (const id of openClawInput.ids) { try { values[id] = await getSecretValue(isOnAlibabaCloud, id); } catch (e) { - errors[id] = { - message: e.message, - }; + errors[id] = { message: e.message }; } }