UNPKG

node-dump-syms

Version:
20 lines (19 loc) 616 B
#! /usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const dump_1 = require("../src/dump"); const node_fs_1 = require("node:fs"); const { argv } = process; const inputFilePath = argv.at(-2); const outputFilePath = argv.at(-1); if (!(0, node_fs_1.existsSync)(inputFilePath)) { logErrorAndExit(`File doesn't exist at path ${inputFilePath}`); } if (!outputFilePath) { logErrorAndExit(`Please specify an output file path`); } (0, dump_1.dumpSyms)(inputFilePath, outputFilePath); function logErrorAndExit(message) { console.error(message); process.exit(-1); }