| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1ff375b commit 8487184
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -758,11 +758,14 @@ function spawnWithSignal(file, args, options) { | |||
| 758 | 758 | const opts = options && typeof options === 'object' && ('signal' in options) ? | |
| 759 | 759 | { ...options, signal: undefined } : | |
| 760 | 760 | options; | |
| 761 | - const child = spawn(file, args, opts); | ||
| 762 | 761 | ||
| 763 | - if (options && options.signal) { | ||
| 762 | + if (options?.signal) { | ||
| 764 | 763 | // Validate signal, if present | |
| 765 | 764 | validateAbortSignal(options.signal, 'options.signal'); | |
| 765 | + } | ||
| 766 | + const child = spawn(file, args, opts); | ||
| 767 | + | ||
| 768 | + if (options && options.signal) { | ||
| 766 | 769 | function kill() { | |
| 767 | 770 | if (child._handle) { | |
| 768 | 771 | child._handle.kill(options.killSignal || 'SIGTERM'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments