Skip to content

Commit

Permalink
fix: npm i uroborosql-fmt-napi explicitly after downloading it (#26)
Browse files Browse the repository at this point in the history
* fix: `npm i` uroborosql-fmt-napi explicitly after downloading it

* format
  • Loading branch information
ota-meshi authored Oct 25, 2023
1 parent 3bce32f commit b6765c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/download-uroborosql-fmt-napi.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { writeFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { ProxyAgent } from "undici";
import * as cp from "child_process";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand All @@ -16,6 +17,8 @@ async function main() {
);
const destination = join(__dirname, "uroborosql-fmt-napi-0.0.0.tgz");
writeFileSync(destination, Buffer.from(await res.arrayBuffer()));

cp.execSync(`npm install ${destination}`, { cwd: __dirname });
}

function autoProxyAgent() {
Expand Down

0 comments on commit b6765c4

Please sign in to comment.