Skip to content

Commit

Permalink
fix(validate): check for readme dir argument to find readmefile
Browse files Browse the repository at this point in the history
  • Loading branch information
venturalp committed May 19, 2021
1 parent 04b0858 commit aec9a1a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/validate.ts
@@ -1,6 +1,6 @@
import fs from 'fs';
import { hashesConst, readmePathConst, coveragePathConst } from './constants';
import { getCoveragePath } from './helpers';
import { getCoveragePath, getReadmePath } from './helpers';
import { logger } from './logger';

const { logInfo } = logger();
Expand Down Expand Up @@ -53,19 +53,19 @@ export const doesReadmeHashExist = (readmePath: string): Promise<boolean | strin
export const checkConfig = (): Promise<void> => {
logInfo('Info: 1. Config check process started');

return doesReadmeFileExist(readmePathConst)
return doesReadmeFileExist(getReadmePath(readmePathConst))
.then(() => {
logInfo('- Readme file exists... ✔️.');
})
.then(() => doesCoverageFileExist(coveragePathConst))
.then(() => doesCoverageFileExist(getCoveragePath(coveragePathConst)))
.then(() => {
logInfo('- Coverage file exists... ✔️.');
})
.then(() => doesCoverageHashesExist(coveragePathConst))
.then(() => doesCoverageHashesExist(getCoveragePath(coveragePathConst)))
.then(() => {
logInfo('- Coverage hashes exist... ✔️.');
})
.then(() => doesReadmeHashExist(readmePathConst))
.then(() => doesReadmeHashExist(getReadmePath(readmePathConst)))
.then(() => {
logInfo('- Readme hashes exist... ✔️.');
})
Expand Down

0 comments on commit aec9a1a

Please sign in to comment.