From e320176d4d099d2408f5bb573fda9a0d06c09d45 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 30 Nov 2018 13:20:39 +0100 Subject: [PATCH] add helper to decode the debug hash when needed --- tooling/decode-debug-hash.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tooling/decode-debug-hash.js diff --git a/tooling/decode-debug-hash.js b/tooling/decode-debug-hash.js new file mode 100644 index 000000000..d96888c65 --- /dev/null +++ b/tooling/decode-debug-hash.js @@ -0,0 +1,10 @@ +const fs = require("fs"); + +const file = process.argv[2]; + +let content = fs.readFileSync(file, "utf-8"); +content = content.replace(/debug-digest-([a-f0-9]+)/g, (match, bin) => { + return Buffer.from(bin, "hex").toString("utf-8"); +}); + +fs.writeFileSync(file, content);