Skip to content

Commit

Permalink
Merge pull request #220 from sourcery-ai/ben/fix-relative-path
Browse files Browse the repository at this point in the history
fix: correct relative path calculation and add debug log
  • Loading branch information
bm424 authored Sep 7, 2023
2 parents 942de0a + aa84f16 commit e555472
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/executable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,22 @@ export function getCodingAssistantAssetsPath(): string {
const executablePath = getExecutablePath();
const absoluteExecutablePath = path.isAbsolute(executablePath)
? executablePath
: path.join(process.cwd(), executablePath);
: path.join(__dirname, "..", executablePath);

return path.join(
let codingAssistantAssetsPath = path.join(
absoluteExecutablePath,
"..",
"coding-assistant-app",
"dist",
"assets"
);

console.log(
"Derived Sourcery Coding Assistant Assets Path: ",
codingAssistantAssetsPath
);

return codingAssistantAssetsPath;
}

export function getExecutablePath(): string {
Expand Down

0 comments on commit e555472

Please sign in to comment.