6: updated questions in create command (#14)
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu'
|
||||
const chalk = require('chalk');
|
||||
const { AutoComplete, Input, Confirm } = require('enquirer');
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { GluegunPrint } from 'gluegun';
|
||||
import { defaultMenuSettings, getSettings } from '../../../../globals';
|
||||
import { getRepoBranches } from '../../../../services/github_rest';
|
||||
const os = require("os");
|
||||
|
||||
const STACK_DEFAULTS = {
|
||||
STACK_ENVIRONMENT_NAME_TAG: 'test',
|
||||
@@ -160,9 +157,10 @@ module.exports = {
|
||||
const input = new Input({
|
||||
type: 'input',
|
||||
name: 'stack',
|
||||
message: `Insert name of the new stack (${chalk.yellow('photowall-test-xx-x')})`
|
||||
message: `Subdomain of new server (${chalk.yellow('test-xxx')})`
|
||||
});
|
||||
const stackName = await input.run();
|
||||
const stacksuffix = await input.run();
|
||||
const stackName = `photowall-${stacksuffix}`
|
||||
|
||||
if (options.includes(stackName)) {
|
||||
print.error(`
|
||||
@@ -176,7 +174,7 @@ module.exports = {
|
||||
} else if (stackName.indexOf('photowall-test-') !== 0) {
|
||||
print.error(`
|
||||
|
||||
The stack must begin with ${chalk.yellow('photowall-test-')}.
|
||||
The stack must begin with ${chalk.yellow('test-')} and then something after like ${chalk.yellow('test-yourname-1')}.
|
||||
|
||||
`);
|
||||
if (toolbox.fromMenu()) {
|
||||
|
||||
Reference in New Issue
Block a user