Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion barretenberg/ts/src/bb_backends/node/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export function detectPlatform(): Platform | null {
*
* Search order:
* 1. If customPath is provided and exists, return it
* 2. Otherwise search in <package-root>/build/<platform>/bb
* 2. If BB_BINARY_PATH is set and exists, return it
* 3. Otherwise search in <package-root>/build/<platform>/bb
*/
export function findBbBinary(customPath?: string): string | null {
// Check custom path first if provided
Expand All @@ -95,6 +96,14 @@ export function findBbBinary(customPath?: string): string | null {
return null;
}

const envPath = process.env.BB_BINARY_PATH;
if (envPath) {
if (fs.existsSync(envPath)) {
return path.resolve(envPath);
}
return null;
}

// Automatic detection
const platform = detectPlatform();
if (!platform) {
Expand Down
Loading