@@ -146,7 +146,11 @@ export async function getRegion(context: LocalContext, flags: { region?: string
146146
147147 if ( ! flags . region ) {
148148 const regionChoices = groupAndSortRegions ( regions . regions ) ;
149- const region = ( await context . enquirer . selectPrompt ( context . isCI , title , regionChoices ) ) as Flags [ 'region' ] ;
149+ const region = ( await context . enquirer . selectPrompt (
150+ context . isInteractive ,
151+ title ,
152+ regionChoices
153+ ) ) as Flags [ 'region' ] ;
150154 invariant ( region , `Region should exist` ) ;
151155 return region ;
152156 }
@@ -171,7 +175,11 @@ export async function getReplicas(context: LocalContext, flags: { replicas?: str
171175 }
172176
173177 if ( ! flags . replicas ) {
174- const replicas = ( await context . enquirer . selectPrompt ( context . isCI , title , replicaChoices ) ) as Flags [ 'replicas' ] ;
178+ const replicas = ( await context . enquirer . selectPrompt (
179+ context . isInteractive ,
180+ title ,
181+ replicaChoices
182+ ) ) as Flags [ 'replicas' ] ;
175183 invariant ( replicas , `Replicas should exist` ) ;
176184 return replicas ;
177185 }
@@ -203,7 +211,7 @@ export async function getInstanceType(
203211
204212 if ( ! flags [ 'instance-type' ] ) {
205213 const instanceType = ( await context . enquirer . selectPrompt (
206- context . isCI ,
214+ context . isInteractive ,
207215 title ,
208216 instanceChoices
209217 ) ) as Flags [ 'instance-type' ] ;
@@ -254,7 +262,9 @@ export async function getImage(
254262 const defaultIndex = sortedImages . findIndex ( ( image ) => image . name . startsWith ( 'postgres:' ) ) ;
255263 const initial = defaultIndex >= 0 ? defaultIndex : 0 ;
256264
257- const image = ( await context . enquirer . selectPrompt ( context . isCI , title , imageChoices , { initial } ) ) as string ;
265+ const image = ( await context . enquirer . selectPrompt ( context . isInteractive , title , imageChoices , {
266+ initial
267+ } ) ) as string ;
258268 invariant ( image , `Postgres version should exist` ) ;
259269 return image ;
260270 } catch {
@@ -278,7 +288,9 @@ export async function implementation(this: LocalContext, flags: Flags) {
278288 const scaleToZeroChild = project . configuration . scaleToZero . childBranches . enabled ;
279289 const inactivityPeriodChild = project . configuration . scaleToZero . childBranches . inactivityPeriodMinutes ;
280290
281- const branchName = await this . enquirer . inputPrompt ( this . isCI , 'Please enter the branch name' , { flag : flags . name } ) ;
291+ const branchName = await this . enquirer . inputPrompt ( this . isInteractive , 'Please enter the branch name' , {
292+ flag : flags . name
293+ } ) ;
282294 if ( ! branchName ) {
283295 this . process . stderr . write ( chalk . red ( `Expected input for flag --name` ) ) ;
284296 this . process . exit ( 1 ) ;
0 commit comments