Skip to content

Commit 0d5ccae

Browse files
authored
fix cargo pgrx install error if there is a build script (#2041)
If there is a build script for extension, `cargo pgrx install` would error because `cargo-pgrx` thinks the build script artifact is expected dynamic library artifact.
1 parent c70ef92 commit 0d5ccae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cargo-pgrx/src/command/install.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ pub(crate) fn find_library_file(
436436
_ => None,
437437
})
438438
// normalize being flattened and low to the ground
439-
.find(|artifact| manifest_path == artifact.manifest_path)
439+
.find(|artifact| {
440+
artifact.manifest_path == manifest_path
441+
&& artifact.target.crate_types.iter().any(|s| s == "cdylib")
442+
})
440443
.and_then(|artifact| {
441444
artifact
442445
.filenames

0 commit comments

Comments
 (0)