gitshift 1.0.4 → 1.0.5
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/package.json +1 -1
- package/src/server.js +22 -3
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -64,6 +64,7 @@ async function checkForUpdates() {
|
|
|
64
64
|
}
|
|
65
65
|
} catch (error) {
|
|
66
66
|
// Ignore version check failures so the CLI still starts offline.
|
|
67
|
+
// intentionally ignore errors (network may be offline)
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
|
|
@@ -122,10 +123,28 @@ async function main() {
|
|
|
122
123
|
)
|
|
123
124
|
.action(doctorCommand);
|
|
124
125
|
|
|
125
|
-
|
|
126
|
+
program.exitOverride();
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
await program.parseAsync(process.argv);
|
|
130
|
+
process.exitCode = 0;
|
|
131
|
+
} catch (err) {
|
|
132
|
+
if (err && (err.name === "CommanderError" || err.code === "outputHelp")) {
|
|
133
|
+
process.exitCode = 0;
|
|
134
|
+
} else {
|
|
135
|
+
throw err;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
126
138
|
}
|
|
127
139
|
|
|
128
140
|
main().catch((error) => {
|
|
129
|
-
|
|
130
|
-
|
|
141
|
+
if (error) {
|
|
142
|
+
if (error.stack) {
|
|
143
|
+
console.error(error.stack);
|
|
144
|
+
} else {
|
|
145
|
+
console.error(error);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
131
150
|
});
|