ante-erp-cli 1.11.51 → 1.11.52
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/bin/ante-cli.js +1 -0
- package/package.json +1 -1
- package/src/commands/update-cli.js +7 -2
package/bin/ante-cli.js
CHANGED
|
@@ -90,6 +90,7 @@ program
|
|
|
90
90
|
.description('Update ANTE CLI tool to latest version')
|
|
91
91
|
.option('--check', 'Check for updates without installing')
|
|
92
92
|
.option('--force', 'Skip confirmation prompt')
|
|
93
|
+
.option('-y, --yes', 'Skip confirmation prompt (alias for --force)')
|
|
93
94
|
.action(updateCli);
|
|
94
95
|
|
|
95
96
|
program
|
package/package.json
CHANGED
|
@@ -74,8 +74,11 @@ export async function updateCli(options) {
|
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// Confirmation prompt
|
|
78
|
-
|
|
77
|
+
// Confirmation prompt (skip if --force/--yes flag or non-interactive mode)
|
|
78
|
+
const isInteractive = process.stdin.isTTY && process.stdout.isTTY;
|
|
79
|
+
const skipPrompt = options.force || options.yes || !isInteractive;
|
|
80
|
+
|
|
81
|
+
if (!skipPrompt) {
|
|
79
82
|
const { confirm } = await inquirer.prompt([
|
|
80
83
|
{
|
|
81
84
|
type: 'confirm',
|
|
@@ -89,6 +92,8 @@ export async function updateCli(options) {
|
|
|
89
92
|
console.log(chalk.gray('\nUpdate cancelled.\n'));
|
|
90
93
|
return;
|
|
91
94
|
}
|
|
95
|
+
} else if (!isInteractive) {
|
|
96
|
+
console.log(chalk.gray('Non-interactive mode detected, proceeding with update...'));
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
// Perform update
|