Skip to content

Commit

Permalink
fix: print debug.pos on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
AxiosLeo committed Jun 22, 2022
1 parent 9de968c commit ee0543a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function emit(data) {

function pos(label, color = '33') {
const stack = (new Error()).stack;
let tmp = stack.split(os.EOL);
let tmp = stack.split('\n');
let local = tmp[3].indexOf('at Object.jump') > -1 ? tmp[4] : tmp[3];
process.stdout.write(`\x1b[${color}m${label} ${local.trim()}\x1b[0m${os.EOL}`);
}
Expand Down

0 comments on commit ee0543a

Please sign in to comment.