|
@@ -17,8 +17,9 @@ pub fn get_external_type(name: &str, path: impl AsRef<Path>) -> Result<Option<sy
|
|
|
.ok_or_else(|| anyhow!("`{name}` not found in use statements"))?;
|
|
|
|
|
|
// Get crate name and version from lock file
|
|
|
- let lib_path = find_path("lib.rs", path)?;
|
|
|
- let lock_path = find_path("Cargo.lock", lib_path)?;
|
|
|
+ let program_path =
|
|
|
+ std::env::var("ANCHOR_IDL_BUILD_PROGRAM_PATH").expect("Failed to get program path");
|
|
|
+ let lock_path = find_path("Cargo.lock", program_path)?;
|
|
|
let lock_file = parse_lock_file(lock_path)?;
|
|
|
let registry_path = get_registry_path()?;
|
|
|
|