Skip to content

Commit 4cd2bb3

Browse files
authored
Merge pull request #7 from SecJS/feat/len-load-sync
fix(config): adjust verifyPath method
2 parents bd1a71e + 8d323ae commit 4cd2bb3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@secjs/config",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "",
55
"license": "MIT",
66
"author": "João Lenon",

src/Config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class Config {
4444
loadSync(configPath = '/config') {
4545
Config.loadEnvs()
4646

47-
const path = `${process.cwd()}/${configPath}`
47+
const path = `${process.cwd()}${configPath}`
4848

4949
const { files } = getFoldersSync(path, true)
5050

@@ -56,7 +56,7 @@ export class Config {
5656
async load(configPath = '/config') {
5757
Config.loadEnvs()
5858

59-
const path = `${process.cwd()}/${configPath}`
59+
const path = `${process.cwd()}${configPath}`
6060

6161
const { files } = await getFolders(path, true)
6262

@@ -66,9 +66,9 @@ export class Config {
6666
}
6767

6868
static verifyPath(folderName = 'dist') {
69-
if (process.env.NODE_ENV === 'testing') return `/${folderName}/config`
69+
if (process.env.NODE_ENV === 'testing') return '/config'
7070

71-
return '/config'
71+
return `/${folderName}/config`
7272
}
7373

7474
private static loadEnvs() {

0 commit comments

Comments
 (0)