From d7e1fb21556128e220ae0481a13154caf604873d Mon Sep 17 00:00:00 2001 From: Tim Diekmann Date: Thu, 14 Nov 2024 10:33:56 +0100 Subject: [PATCH] Add `pwd` to environment variable in CI --- .github/workflows/test.yml | 4 ++-- libs/chonky/src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d232032ff1..54ffe680857 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -146,7 +146,7 @@ jobs: tar -xzf $temp_dir/pdfium-linux-x64.tgz -C $temp_dir mv $temp_dir/lib/* "${{ matrix.directory }}/libs/" rm -rf $temp_dir - echo "PDFIUM_DYNAMIC_LIB_PATH='${{ matrix.directory }}/libs/'" >> $GITHUB_ENV + echo "PDFIUM_DYNAMIC_LIB_PATH='${pwd}/${{ matrix.directory }}/libs/'" >> $GITHUB_ENV - name: Install Rust toolchain if: always() && steps.tests.outputs.has-rust == 'true' @@ -291,7 +291,7 @@ jobs: tar -xzf $temp_dir/pdfium-linux-x64.tgz -C $temp_dir mv $temp_dir/lib/* "${{ matrix.directory }}/libs/" rm -rf $temp_dir - echo "PDFIUM_DYNAMIC_LIB_PATH='${{ matrix.directory }}/libs/'" >> $GITHUB_ENV + echo "PDFIUM_DYNAMIC_LIB_PATH='${pwd}/${{ matrix.directory }}/libs/'" >> $GITHUB_ENV - name: Install playwright if: matrix.package == '@tests/hash-playwright' diff --git a/libs/chonky/src/lib.rs b/libs/chonky/src/lib.rs index 868cd2eedd7..a5638709480 100644 --- a/libs/chonky/src/lib.rs +++ b/libs/chonky/src/lib.rs @@ -49,7 +49,8 @@ pub fn link_pdfium() -> Result> { let lib_path = Path::new(lib_path.as_ref()) .canonicalize() - .change_context(ChonkyError::Pdfium)?; + .change_context(ChonkyError::Pdfium) + .attach_printable_lazy(|| format!("could not canonicalize path `{lib_path}`"))?; Ok(Pdfium::new( Pdfium::bind_to_library(Pdfium::pdfium_platform_library_name_at_path(&lib_path)) .change_context(ChonkyError::Pdfium)?,