socket-function 1.2.34 → 1.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/runPromise.d.ts +1 -0
- package/src/runPromise.ts +4 -1
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/src/runPromise.d.ts
CHANGED
package/src/runPromise.ts
CHANGED
|
@@ -9,6 +9,7 @@ export async function runPromise(command: string, config?: {
|
|
|
9
9
|
// Never throw, just return the full output
|
|
10
10
|
nothrow?: boolean;
|
|
11
11
|
detach?: boolean;
|
|
12
|
+
includeStderrInOutput?: boolean;
|
|
12
13
|
}) {
|
|
13
14
|
return new Promise<string>((resolve, reject) => {
|
|
14
15
|
if (!config?.quiet) {
|
|
@@ -38,7 +39,9 @@ export async function runPromise(command: string, config?: {
|
|
|
38
39
|
childProc.stderr?.on("data", (data) => {
|
|
39
40
|
const chunk = data.toString();
|
|
40
41
|
stderr += chunk;
|
|
41
|
-
|
|
42
|
+
if (config?.includeStderrInOutput) {
|
|
43
|
+
fullOutput += chunk;
|
|
44
|
+
}
|
|
42
45
|
|
|
43
46
|
// Stream to console unless quiet mode
|
|
44
47
|
if (!config?.quiet) {
|