You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constquestion=`Please enter a stage name you’d like to use locally. Or hit enter to use the one based on your AWS credentials (${suggested}): `;
267
+
268
+
// Prompt to enter a stage name
269
+
constinput=awaitquestionSync(`Look like you’re running sst for the first time in this directory. ${question}`);
270
+
letfinal=input.trim()||suggested;
271
+
272
+
// Re-prompt if stage name is invalid
273
+
while(!State.validateStage(final)){
274
+
logger.error(chalk.red("Stage names must start with a letter, and contain only letters, numbers, and hyphens."));
275
+
constinput=awaitquestionSync(`\n${question}`);
276
+
final=input.trim()||suggested;
277
+
}
278
+
279
+
State.setStage(paths.appPath,final);
280
+
returnfinal;
281
+
}
282
+
283
+
functionquestionSync(question){
265
284
constrl=readline.createInterface({
266
285
input: process.stdin,
267
286
output: process.stdout,
268
287
});
269
288
returnnewPromise((resolve)=>{
270
-
rl.question(
271
-
`Look like you’re running sst for the first time in this directory. Please enter a stage name you’d like to use locally. Or hit enter to use the one based on your AWS credentials (${suggested}): `,
0 commit comments