Skip to content

Commit

Permalink
set relative path for wsam files
Browse files Browse the repository at this point in the history
  • Loading branch information
gkorland committed Jan 7, 2024
1 parent db1249f commit fb1f70a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/api/repo/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,12 +467,12 @@ export async function POST(request: NextRequest) {
// Initialize Tree-Sitter parser
await Parser.init({
locateFile(scriptName: string, scriptDirectory: string) {
return scriptName;
return path.join(process.cwd(), 'app/api/repo', scriptName);
},
});

parser = new Parser();
const Python = await Parser.Language.load('tree-sitter-python.wasm');
const Python = await Parser.Language.load(path.join(process.cwd(), 'app/api/repo/tree-sitter-python.wasm'));

parser.setLanguage(Python);

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit fb1f70a

Please sign in to comment.