Skip to content

Commit

Permalink
Build script: support NGINX_DIR env var to specify the Nginx folder
Browse files Browse the repository at this point in the history
  • Loading branch information
gabioprisan committed Dec 11, 2023
1 parent d8eabb1 commit a181ae9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nginx_module/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nginx_module"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
build = "build.rs"
authors = ["Gabriel Oprisan <gabriel.oprisan@gcore.com>"]
Expand Down
6 changes: 6 additions & 0 deletions nginx_module/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ fn search_nginx_root_folder() -> String {
})
}

if let Ok(nginx_dir) = std::env::var("NGINX_DIR") {
if check_nginx_root(Path::new(&nginx_dir)) {
return nginx_dir;
}
}

let base_locations = [
"..",
"../..",
Expand Down

0 comments on commit a181ae9

Please sign in to comment.