Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 8bb05e1

Browse files
gitthekingsbahra
authored andcommitted
Merge in latest improvements. (#24)
Several improvements, and fixes issue with callback. * Fixed bug with invalid path to exec and pend invalid exception * Mocha and chai unit test * Package version update and appveyor duplicated key fix * Fix for node env * Invalid yaml character * Invalid npm install type * build: off flag * Mocha path instead of run test task * Mocha execution * npm command fix * Mocha powershell script * add ps scripts to npm install * npm run test * appveyor config for mocha * npm run test diffrent mocha exe * install section * Appveyor badge * fixed invalid readme formatting * small typo fix clientTets -> clientTests * add support to node on OS other than Windows * removed unused callback function * node condition fix * comments
1 parent 32ff40c commit 8bb05e1

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

.vscode/launch.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"type": "node",
9-
"request": "launch",
10-
"name": "Mocha Tests",
11-
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
12-
"args": [
13-
"-u",
14-
"tdd",
15-
"--timeout",
16-
"999999",
17-
"--colors",
18-
"${workspaceFolder}/test"
19-
],
20-
"internalConsoleOptions": "openOnSessionStart"
21-
}
22-
]
23-
}
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Mocha Tests",
11+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
12+
"args": [
13+
"-u",
14+
"tdd",
15+
"--timeout",
16+
"999999",
17+
"--colors",
18+
"${workspaceFolder}/test"
19+
],
20+
"internalConsoleOptions": "openOnSessionStart"
21+
}
22+
]
23+
}

lib/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,18 +517,19 @@ BacktraceReport.prototype.sendSync = function() {
517517
var stdioValue = debugBacktrace ? 'inherit' : 'ignore';
518518
var payloadString = JSON.stringify(this.payload);
519519

520+
// send reports for processes other than node
521+
// for example from production electron application
520522
const execName = path.basename(process.execPath);
521-
if (execName !== 'node.exe') {
523+
if (execName !== 'node.exe' && execName !== 'node') {
522524
sendReport(this.payload, err => {
523-
if (callback) {
524-
callback(err);
525-
} else if (err && debugBacktrace) {
525+
if (err && debugBacktrace) {
526526
console.error(err.stack);
527527
}
528528
});
529529
return;
530530
}
531531

532+
// spawn send process when node process is available
532533
spawnSync(process.execPath, args, {
533534
input: payloadString,
534535
timeout: timeout,

0 commit comments

Comments
 (0)