From 1d0d16b24d087f126da1a4e6803ea209c183e77c Mon Sep 17 00:00:00 2001 From: Phoebe Lartisant Date: Wed, 18 Dec 2024 13:39:15 -0500 Subject: [PATCH] chanhe show files command --- cli/src/commands/showFile.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/showFile.ts b/cli/src/commands/showFile.ts index 28e8f65..9ebf269 100644 --- a/cli/src/commands/showFile.ts +++ b/cli/src/commands/showFile.ts @@ -30,8 +30,9 @@ export const showFileCommand = new Command('show') console.log('Targeting website at address', sc.address) const fileContent = await getFileFromAddress(provider, sc.address, filePath) - const decoder = new TextDecoder() - const fileContentString = decoder.decode(fileContent) + const fileContentString = Array.from(new Uint8Array(fileContent)) + .map((byte) => String.fromCharCode(byte)) + .join('') console.log(fileContentString) })