Skip to content

Commit

Permalink
fix: fix gptscript binary path and prep for v0.7.3 release
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed May 29, 2024
1 parent 5460c8d commit a83af5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gptscript-ai/gptscript",
"version": "v0.7.2",
"version": "v0.7.3",
"description": "Run gptscript in node.js",
"source": "src/gptscript.ts",
"main": "dist/gptscript.js",
Expand Down
3 changes: 2 additions & 1 deletion src/gptscript.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import http from "http"
import path from "path"
import child_process from "child_process"
import {fileURLToPath} from "url"

export interface RunOpts {
input?: string
Expand Down Expand Up @@ -667,7 +668,7 @@ function getCmdPath(): string {
return process.env.GPTSCRIPT_BIN
}

return path.resolve("..", "bin", "gptscript")
return path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "bin", "gptscript")
}

function parseBlocksFromNodes(nodes: any[]): Block[] {
Expand Down

0 comments on commit a83af5b

Please sign in to comment.