Skip to content

Commit

Permalink
Merge pull request #3655 from LiskHQ/3642-Commander_failed_to_install…
Browse files Browse the repository at this point in the history
…_lisk_core

Commander failed to install lisk core - Closes #3642
  • Loading branch information
MaciejBaj committed May 17, 2019
2 parents e2596c7 + ca995e3 commit f6b4212
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
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

0 comments on commit f6b4212

Please sign in to comment.