Skip to content

Commit

Permalink
chanhe show files command
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant committed Dec 18, 2024
1 parent 7f3de1d commit 1d0d16b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/src/commands/showFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

0 comments on commit 1d0d16b

Please sign in to comment.