mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
fix: case-sensitiveness check
This commit is contained in:
parent
cac45a41e2
commit
ad96859d71
3 changed files with 18 additions and 1 deletions
|
@ -15,5 +15,18 @@ fn main() -> std::io::Result<()> {
|
|||
println!("cargo:rustc-env=GIT_HASH_SHORT={git_hash_short}");
|
||||
println!("cargo:rustc-env=BUILD_DATE={now}");
|
||||
println!("cargo:rustc-env=CARGO_ERG_PATH={}", erg_path.display());
|
||||
let case_sensitive = if cfg!(windows) {
|
||||
false
|
||||
} else if cfg!(target_os = "macos") {
|
||||
let command = Command::new("diskutil")
|
||||
.args(["info", "/"])
|
||||
.output()
|
||||
.expect("failed to get the file system type");
|
||||
let output = String::from_utf8_lossy(&command.stdout);
|
||||
output.contains("Case-sensitive")
|
||||
} else {
|
||||
true
|
||||
};
|
||||
println!("cargo:rustc-env=CASE_SENSITIVE={}", case_sensitive);
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue