Skip to content

Commit 9d986c1

Browse files
authored
fix(debug): encoding --tx-file path (#200)
1 parent 2fceebc commit 9d986c1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/cmd/debug.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { dumpTransaction } from '../tools/ckb-tx-dumper';
55
import path from 'path';
66
import { cccA } from '@ckb-ccc/core/advanced';
77
import { Network } from '../type/base';
8+
import { encodeBinPathForTerminal } from '../util/encoding';
89

910
export function debugTransaction(txHash: string, network: Network) {
1011
const txFile = buildTxFileOptionBy(txHash, network);
@@ -91,7 +92,7 @@ export function buildTxFileOptionBy(txHash: string, network: Network) {
9192
}
9293
dumpTransaction({ rpc, txJsonFilePath, outputFilePath });
9394
}
94-
const opt = `--tx-file ${outputFilePath}`;
95+
const opt = `--tx-file ${encodeBinPathForTerminal(outputFilePath)}`;
9596
return opt;
9697
}
9798

0 commit comments

Comments
 (0)