Skip to content

Commit

Permalink
remove __dirname usage from live code
Browse files Browse the repository at this point in the history
  • Loading branch information
UrielCh committed Apr 24, 2024
1 parent 524a95b commit 097dfbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export function setEnv(name: string, value: string): void {
export function getDirname(): string {
// return __dirname if it's a nodejs script
// if (typeof __dirname !== "undefined") {
return __dirname;
// return __dirname;
// }
// return import.meta.url if it's a module
//return new URL(".", import.meta.url).pathname;
return new URL(".", import.meta.url).pathname;
}

export class Platfrm {
Expand Down

0 comments on commit 097dfbd

Please sign in to comment.