ante-erp-cli 1.11.28 → 1.11.29
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/commands/backup.js +8 -2
package/package.json
CHANGED
package/src/commands/backup.js
CHANGED
|
@@ -247,6 +247,9 @@ export async function backup(options) {
|
|
|
247
247
|
console.log(chalk.gray(`Total size: ${size.split('\t')[0]}\n`));
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
// Return backup file path (for programmatic usage)
|
|
251
|
+
return backupFile;
|
|
252
|
+
|
|
250
253
|
} catch (error) {
|
|
251
254
|
if (spinner) {
|
|
252
255
|
spinner.fail('Backup failed');
|
|
@@ -255,8 +258,11 @@ export async function backup(options) {
|
|
|
255
258
|
}
|
|
256
259
|
|
|
257
260
|
} catch (error) {
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
if (!options.silent) {
|
|
262
|
+
console.error(chalk.red('Error:'), error.message);
|
|
263
|
+
process.exit(1);
|
|
264
|
+
}
|
|
265
|
+
throw error;
|
|
260
266
|
}
|
|
261
267
|
}
|
|
262
268
|
|