mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-25 05:21:03 -07:00
feat(offload): silence provisioning warnings and add --yes flag for setup
This commit is contained in:
@@ -80,7 +80,8 @@ export class GceCosProvider implements WorkerProvider {
|
||||
'--boot-disk-type', 'pd-balanced',
|
||||
'--metadata', `startup-script=${startupScript},enable-oslogin=TRUE`,
|
||||
'--network-interface', `network=${vpcName},subnet=${subnetName},no-address`,
|
||||
'--scopes', 'https://www.googleapis.com/auth/cloud-platform'
|
||||
'--scopes', 'https://www.googleapis.com/auth/cloud-platform',
|
||||
'--quiet' // Silences informational warnings like disk size mismatch
|
||||
], { stdio: 'inherit' });
|
||||
|
||||
if (result.status === 0) {
|
||||
|
||||
@@ -14,6 +14,9 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const REPO_ROOT = path.resolve(__dirname, '../../../..');
|
||||
|
||||
async function prompt(question: string, defaultValue: string): Promise<string> {
|
||||
const autoAccept = process.argv.includes('--yes') || process.argv.includes('-y');
|
||||
if (autoAccept && defaultValue) return defaultValue;
|
||||
|
||||
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
||||
return new Promise((resolve) => {
|
||||
rl.question(`${question} (default: ${defaultValue}, <Enter> to use default): `, (answer) => {
|
||||
@@ -24,6 +27,9 @@ async function prompt(question: string, defaultValue: string): Promise<string> {
|
||||
}
|
||||
|
||||
async function confirm(question: string): Promise<boolean> {
|
||||
const autoAccept = process.argv.includes('--yes') || process.argv.includes('-y');
|
||||
if (autoAccept) return true;
|
||||
|
||||
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
||||
return new Promise((resolve) => {
|
||||
rl.question(`${question} (y/n): `, (answer) => {
|
||||
|
||||
Reference in New Issue
Block a user