File tree Expand file tree Collapse file tree
barretenberg/ts/src/bb_backends/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ export function detectPlatform(): Platform | null {
8383 *
8484 * Search order:
8585 * 1. If customPath is provided and exists, return it
86- * 2. Otherwise search in <package-root>/build/<platform>/bb
86+ * 2. If BB_BINARY_PATH is set and exists, return it
87+ * 3. Otherwise search in <package-root>/build/<platform>/bb
8788 */
8889export function findBbBinary ( customPath ?: string ) : string | null {
8990 // Check custom path first if provided
@@ -95,6 +96,14 @@ export function findBbBinary(customPath?: string): string | null {
9596 return null ;
9697 }
9798
99+ const envPath = process . env . BB_BINARY_PATH ;
100+ if ( envPath ) {
101+ if ( fs . existsSync ( envPath ) ) {
102+ return path . resolve ( envPath ) ;
103+ }
104+ return null ;
105+ }
106+
98107 // Automatic detection
99108 const platform = detectPlatform ( ) ;
100109 if ( ! platform ) {
You can’t perform that action at this time.
0 commit comments