You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,13 +56,19 @@ installer('vim')
56
56
});
57
57
```
58
58
59
-
## API - spawning(command, arguments, progress, options)
59
+
## API - spawning(command, arguments, progressOptions, options)
60
60
61
-
`spawning` takes an additional argument, `progress`, its [`options`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) are the same as those of `child_process.spawn`.
61
+
`Spawning` takes an additional argument, `progressOptions`, its [`options`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) are the same as those of `child_process.spawn` plus:
62
62
63
-
*`progress`: callback handler for `stdout.on('data')` events.
63
+
```js
64
+
sudo: boolean, // run as administrator
65
+
onerror: callable, // callback for `stderr.on('data')` event.
66
+
onprogress: callable, // callback for `stdout.on('data')` event.
67
+
// onmessage: callable, // callback for send `on('message')` event.
68
+
```
69
+
70
+
`Spawning` returns a promise whose result will be any output or any data return in the progress callback.
64
71
65
-
It returns a promise whose result will be any output or any data return in the progress callback.
66
72
*The progress callback will receive an object with these properties:*
67
73
68
74
*`handle:`*Object* - Spawned child process instance handler.
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "node-sys",
3
-
"version": "1.0.4",
3
+
"version": "1.0.5",
4
4
"description": "Universal package installer, get the command for managing packages, or auto install any package, using one command for all platforms. Automate the installation of macOS Brew, and Windows Chocolatey package managers. A promisify child process of spawn.",
0 commit comments