Skip to content

Commit

Permalink
feature: make paths compatible with windows
Browse files Browse the repository at this point in the history
  • Loading branch information
matt mankins committed Oct 19, 2023
1 parent 39e38eb commit 84d672b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions identity-wallet/setler-cli/src/cli.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/usr/bin/env node

// import updateNotifier from "update-notifier";
import { URL } from "url";
import { URL, fileURLToPath } from "url";
import config from "./config.js";
import dotenv from "dotenv";
import fs from "fs";
import meow from "meow";
import path from "path";
import setler from "./index.js";
const __dirname = new URL(".", import.meta.url).pathname;
// const __dirname = new URL(".", import.meta.url).pathname;
const __dirname = fileURLToPath(new URL(".", import.meta.url))
let personality = __dirname.split("/").slice(-3)[0];
personality = personality.replace("-cli", "");

dotenv.config({ path: path.resolve(__dirname, "../.env") });
dotenv.config({ path: path.join(__dirname, "..", "/.env") });

const pkgPath = path.join(__dirname, '..', 'package.json');
const pkgJson = JSON.parse(
fs.readFileSync(path.resolve(__dirname, "../package.json"))
fs.readFileSync(pkgPath)
);

// squelch experimental warnings
Expand Down

2 comments on commit 84d672b

@vercel
Copy link

@vercel vercel bot commented on 84d672b Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 84d672b Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ident-agency-net-enola – ./ident-agency/packages/enola

ident-agency-net-enola-git-main-loremlabs.vercel.app
ident-agency-net-enola.vercel.app
ident-agency-net-enola-loremlabs.vercel.app

Please sign in to comment.