Skip to content

Commit

Permalink
v2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
barthofu authored Jan 14, 2025
2 parents e1bb9ee + a3a6930 commit 04477c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/utils/classes/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export class Plugin {
private _translations: { [key: string]: BaseTranslation }

constructor(path: string) {
this._path = path
this._path = path.replace('file://', '')
}

public async load(): Promise<void> {
// check if the plugin.json is present
if (!await fs.existsSync(`${this._path}/plugin.json`))
if (!fs.existsSync(`${this._path}/plugin.json`))
return this.stopLoad('plugin.json not found')

// read plugin.json
Expand Down
3 changes: 2 additions & 1 deletion src/utils/types/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ export const env = cleanEnv(process.env, {

export function checkEnvironmentVariables() {
const config = mikroORMConfig[env.NODE_ENV]

// @ts-expect-error
const isSqliteDatabase = !!config.dbName && !config.port
if (isSqliteDatabase) {
if (!isSqliteDatabase) {
cleanEnv(process.env, {
DATABASE_HOST: str(),
DATABASE_PORT: num(),
Expand Down

0 comments on commit 04477c9

Please sign in to comment.