Skip to content

Commit

Permalink
fix: revert to using console.error for debug messages (#4478)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-luong committed Mar 21, 2023
1 parent d3f72b2 commit f28ceb1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ts-binary-wrapper/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export function runWrapper(executable: string, cliArguments: string[]): number {
const debug = debugEnabled(cliArguments);

if (debug) {
console.debug('Executing: ' + executable + ' ' + cliArguments.join(' '));
console.error('Executing: ' + executable + ' ' + cliArguments.join(' '));
}

const res = spawnSync(executable, cliArguments, {
Expand All @@ -184,12 +184,12 @@ export function runWrapper(executable: string, cliArguments: string[]): number {

if (res.status !== null) {
if (debug) {
console.debug(res);
console.error(res);
}

return res.status;
} else {
console.debug(res);
console.error(res);
if (!formatErrorMessage((res.error as SpawnError).code)) {
console.error('Failed to spawn child process. (' + executable + ')');
}
Expand Down Expand Up @@ -271,18 +271,18 @@ export function downloadExecutable(
if (filenameShasum && actualShasum != filenameShasum) {
cleanupAfterError(Error('Shasum comparison failed!\n' + debugMessage));
} else {
console.debug(debugMessage);
console.error(debugMessage);

// finally rename the file and change permissions
fs.renameSync(temp, filename);
fs.chmodSync(filename, 0o755);
console.debug('Downloaded successfull! ');
console.error('Downloaded successfull! ');
}

resolve(undefined);
});

console.debug(
console.error(
"Downloading from '" + downloadUrl + "' to '" + filename + "'",
);

Expand Down

0 comments on commit f28ceb1

Please sign in to comment.