Test form/sign: khong de FOFREEXIT_QPDF_PATH neu da co (CI set san), mac dinh qpdf/ o root workspace - bo gia tri /usr/bin hard-code tu may dev Linux cu
Build Windows portable / build (push) Canceled after 0s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-08 02:52:43 +07:00
co-authored by Claude Fable 5
parent b251e677a1
commit b38655a011
2 changed files with 23 additions and 5 deletions
+8 -1
View File
@@ -12,9 +12,16 @@ fn workspace_root() -> PathBuf {
.expect("workspace root")
}
// KHÔNG đè biến môi trường nếu đã có (CI set sẵn); mặc định thử qpdf/ ở root
// workspace (fetch-qpdf.ps1 đặt ở đó), fallback /usr/bin cho máy Linux.
fn ensure_qpdf() {
if std::env::var("FOFREEXIT_QPDF_PATH").is_err() {
std::env::set_var("FOFREEXIT_QPDF_PATH", "/usr/bin");
let ws = workspace_root().join("qpdf").join("bin");
if ws.exists() {
std::env::set_var("FOFREEXIT_QPDF_PATH", ws);
} else {
std::env::set_var("FOFREEXIT_QPDF_PATH", "/usr/bin");
}
}
}