Remove debug output from tools/deflopt

This is on the hot path. Revert this commit if debugging is needed.
This commit is contained in:
Christopher Monsanto
2020-05-01 07:44:03 -04:00
parent b496612b03
commit a7aec16803
4 changed files with 2 additions and 13 deletions

5
pnpm-lock.yaml generated
View File

@@ -1,9 +1,6 @@
importers:
tools/deflopt:
dependencies:
debug: 4.1.1
specifiers:
debug: ^4.1.1
specifiers: {}
tools/deploy:
dependencies:
commander: 5.1.0

View File

@@ -1,4 +0,0 @@
import debugfn from 'debug';
export default debugfn('deflopt');

View File

@@ -1,6 +1,5 @@
import cp from 'child_process';
import debug from './debug.js';
/*
Output looks something like:
@@ -32,7 +31,6 @@ export function deflopt(exe, file) {
// command line switches.
file = file.replace(/\//g, "\\");
debug("File at: " + file);
const output = cp.execFileSync(
"wine",
[exe, file],
@@ -40,9 +38,7 @@ export function deflopt(exe, file) {
// Wine doesn't even like it when the current directory is on fuse!
// What a persnickety program!
cwd: '/'});
debug("Output: " + JSON.stringify(output));
const processed = parse("Number of files processed", output);
const rewritten = parse("Number of files rewritten", output);
debug(`Processed ${processed}, rewritten ${rewritten}`);
return {processed, rewritten};
}

View File

@@ -1 +1 @@
{"type":"module","dependencies":{"debug":"^4.1.1"}}
{"type":"module","dependencies":{}}