@lvnt/release-radar 1.1.0 → 1.1.1
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/dist/updater.js +6 -0
- package/package.json +1 -1
package/dist/updater.js
CHANGED
|
@@ -27,6 +27,9 @@ export function executeUpdate() {
|
|
|
27
27
|
const npmProcess = spawn('npm', ['update', '-g', '@lvnt/release-radar'], {
|
|
28
28
|
stdio: 'inherit'
|
|
29
29
|
});
|
|
30
|
+
npmProcess.on('error', (err) => {
|
|
31
|
+
resolve({ success: false, error: `npm process error: ${err.message}` });
|
|
32
|
+
});
|
|
30
33
|
npmProcess.on('close', (code) => {
|
|
31
34
|
if (code !== 0) {
|
|
32
35
|
resolve({ success: false, error: `npm update failed with code ${code}` });
|
|
@@ -35,6 +38,9 @@ export function executeUpdate() {
|
|
|
35
38
|
const pm2Process = spawn('pm2', ['restart', 'release-radar'], {
|
|
36
39
|
stdio: 'inherit'
|
|
37
40
|
});
|
|
41
|
+
pm2Process.on('error', (err) => {
|
|
42
|
+
resolve({ success: false, error: `pm2 process error: ${err.message}` });
|
|
43
|
+
});
|
|
38
44
|
pm2Process.on('close', (pm2Code) => {
|
|
39
45
|
if (pm2Code !== 0) {
|
|
40
46
|
resolve({ success: false, error: `pm2 restart failed with code ${pm2Code}` });
|