Skip to content

Commit

Permalink
Fix for different naming of nodejs on ubuntu
Browse files Browse the repository at this point in the history
also added static lifetime to str constants as these were failing on nightly windows
  • Loading branch information
budziq committed May 22, 2017
1 parent 1d141aa commit 87f26a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ extern crate error_chain;

#[cfg(windows)]
mod execs {
pub const NPM: &str = "npm.cmd";
pub const STYLUS: &str = "stylus.cmd";
pub const NPM: &'static str = "npm.cmd";
pub const STYLUS: &'static str = "stylus.cmd";
}
#[cfg(not(windows))]
mod execs {
pub const NPM: &str = "npm";
pub const STYLUS: &str = "stylus";
pub const NPM: &'static str = "npm";
pub const STYLUS: &'static str = "stylus";
}


Expand Down Expand Up @@ -68,7 +68,7 @@ fn run() -> Result<()> {
if let Ok(_) = env::var("CARGO_FEATURE_REGENERATE_CSS") {
// Check dependencies
Program(execs::NPM).exists()?;
Program("node").exists()?;
Program("node").exists().or(Program("nodejs").exists())?;
Package("nib").exists()?;
Package("stylus").exists()?;

Expand Down

0 comments on commit 87f26a8

Please sign in to comment.