Skip to content

Commit

Permalink
Fix rpath correction for .so files on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Sep 8, 2022
1 parent 462aa11 commit 9a621c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Change how your team works.
 


# tea/cli 0.5.0
# tea/cli 0.5.1

tea is a universal virtual‑environment manager:

Expand Down
5 changes: 4 additions & 1 deletion src/prefab/fix-rpaths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ async function get_bad_otool_listings(exename: Path, type: 'exe' | 'lib'): Promi
const lines = (await runAndGetOutput({cmd: ["otool", "-L", exename]}))
.trim()
.split("\n")
.slice(type == 'lib' ? 2 : 1) // dylibs list themselves on 1st and 2nd lines
.slice(exename.extname() == '.dylib' ? 2 : 1)
// ^^ dylibs list themselves on 1st and 2nd lines
// NOTE that if the file is named .so then this is not true even though it is still a dylib
// NOBODY KNOW WHY

const rv: string[] = []
for (const line of lines) {
Expand Down

0 comments on commit 9a621c6

Please sign in to comment.