|
2 | 2 |
|
3 | 3 | "use strict" |
4 | 4 |
|
5 | | -// Copyright (c) 2016 Sentry (https://sentry.io/) and individual contributors. |
6 | | -// All rights reserved. |
7 | | -// |
8 | | -// Redistribution and use in source and binary forms, with or without |
9 | | -// modification, are permitted provided that the following conditions are met: |
10 | | -// |
11 | | -// 1. Redistributions of source code must retain the above copyright notice, |
12 | | -// this list of conditions and the following disclaimer. |
13 | | -// |
14 | | -// 2. Redistributions in binary form must reproduce the above copyright |
15 | | -// notice, this list of conditions and the following disclaimer in the |
16 | | -// documentation and/or other materials provided with the distribution. |
17 | | -// |
18 | | -// 3. Neither the name of the Sentry nor the names of its contributors may be |
19 | | -// used to endorse or promote products derived from this software without specific |
20 | | -// prior written permission. |
21 | | -// |
22 | | -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
23 | | -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
24 | | -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
25 | | -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
26 | | -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
27 | | -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
28 | | -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
29 | | -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
30 | | -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
31 | | -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32 | | -// |
33 | | -// from: https://github.com/getsentry/sentry-cli/blob/acc8d00eb1965d8f49a9f337b7776c782d253ac4/bin/sentry-cli |
34 | | - |
35 | | -const childProcess = require("child_process") |
36 | | -const { binaryPath } = require("../helpers") |
37 | | - |
38 | | -const child = childProcess.spawn(binaryPath, process.argv.slice(2), { |
39 | | - stdio: "inherit", |
40 | | -}) |
41 | | - |
42 | | -child.on("error", err => { |
43 | | - console.error("error: failed to invoke squawk") |
44 | | - console.error(err.stack) |
45 | | - process.exit(1) |
46 | | -}) |
47 | | - |
48 | | -child.on("exit", code => { |
49 | | - process.exit(code) |
50 | | -}) |
51 | | - |
52 | | -process.on("SIGTERM", () => { |
53 | | - child.kill("SIGTERM") |
54 | | -}) |
55 | | - |
56 | | -process.on("SIGINT", () => { |
57 | | - child.kill("SIGINT") |
58 | | -}) |
| 5 | +require("../index.js").run() |
0 commit comments