Fix for different naming of nodejs on ubuntu
also added static lifetime to str constants as these were failing on nightly windows
This commit is contained in:
parent
1d141aa27b
commit
87f26a82b6
10
build.rs
10
build.rs
|
@ -8,13 +8,13 @@ extern crate error_chain;
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
mod execs {
|
mod execs {
|
||||||
pub const NPM: &str = "npm.cmd";
|
pub const NPM: &'static str = "npm.cmd";
|
||||||
pub const STYLUS: &str = "stylus.cmd";
|
pub const STYLUS: &'static str = "stylus.cmd";
|
||||||
}
|
}
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
mod execs {
|
mod execs {
|
||||||
pub const NPM: &str = "npm";
|
pub const NPM: &'static str = "npm";
|
||||||
pub const STYLUS: &str = "stylus";
|
pub const STYLUS: &'static str = "stylus";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ fn run() -> Result<()> {
|
||||||
if let Ok(_) = env::var("CARGO_FEATURE_REGENERATE_CSS") {
|
if let Ok(_) = env::var("CARGO_FEATURE_REGENERATE_CSS") {
|
||||||
// Check dependencies
|
// Check dependencies
|
||||||
Program(execs::NPM).exists()?;
|
Program(execs::NPM).exists()?;
|
||||||
Program("node").exists()?;
|
Program("node").exists().or(Program("nodejs").exists())?;
|
||||||
Package("nib").exists()?;
|
Package("nib").exists()?;
|
||||||
Package("stylus").exists()?;
|
Package("stylus").exists()?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue