We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 21c1abb + 0b64d80 commit aefc561Copy full SHA for aefc561
adminforth/commands/cli.js
@@ -12,6 +12,7 @@ import createResource from "./createResource/main.js";
12
import chalk from "chalk";
13
import path from "path";
14
import fs from "fs";
15
+import { fileURLToPath } from 'url';
16
17
function showHelp() {
18
console.log(
@@ -26,7 +27,7 @@ function showHelp() {
26
27
}
28
29
export function currentFileDir(importMetaUrl) {
- const filePath = importMetaUrl.replace("file://", "");
30
+ const filePath = fileURLToPath(importMetaUrl);
31
const fileDir = path.dirname(filePath);
32
return fileDir;
33
0 commit comments