Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commander failed to install lisk core - Closes #3642 #3655

Merged
merged 1 commit into from May 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 4 additions & 8 deletions commander/src/utils/core/cache.ts
Expand Up @@ -66,10 +66,8 @@ const stopCommand = async (
): Promise<string> => {
try {
const {
config: {
components: {
cache: { password },
},
components: {
cache: { password },
},
}: LiskConfig = await getLiskConfig(installDir, network);
const { redisPort } = await describeApplication(name);
Expand Down Expand Up @@ -109,10 +107,8 @@ export const isCacheEnabled = async (
): Promise<boolean> => {
try {
const {
config: {
components: {
cache: { enabled },
},
components: {
cache: { enabled },
},
}: LiskConfig = await getLiskConfig(installDir, network);

Expand Down
5 changes: 1 addition & 4 deletions commander/src/utils/core/config.ts
Expand Up @@ -40,13 +40,10 @@ interface ComponentsConfig {
readonly cache: CacheConfig;
}

interface Config {
export interface LiskConfig {
readonly app: AppConfig;
readonly components: ComponentsConfig;
}
export interface LiskConfig {
readonly config: Config;
}

export const defaultLiskPath = path.join(os.homedir(), '.lisk');
export const defaultLiskPm2Path = `${defaultLiskPath}/pm2`;
Expand Down
18 changes: 6 additions & 12 deletions commander/src/utils/core/database.ts
Expand Up @@ -97,10 +97,8 @@ export const createUser = async (
): Promise<string> => {
try {
const {
config: {
components: {
storage: { user, password },
},
components: {
storage: { user, password },
},
}: LiskConfig = await getLiskConfig(installDir, network);
const { dbPort } = await describeApplication(name);
Expand Down Expand Up @@ -129,10 +127,8 @@ export const createDatabase = async (
): Promise<string> => {
try {
const {
config: {
components: {
storage: { database },
},
components: {
storage: { database },
},
}: LiskConfig = await getLiskConfig(installDir, network);
const { dbPort } = await describeApplication(name);
Expand Down Expand Up @@ -184,10 +180,8 @@ export const restoreSnapshot = async (
): Promise<string> => {
try {
const {
config: {
components: {
storage: { database, user },
},
components: {
storage: { database, user },
},
}: LiskConfig = await getLiskConfig(installDir, network);
const { dbPort } = await describeApplication(name);
Expand Down