|
@@ -64,13 +64,15 @@ fn main() { |
|
|
::std::process::exit(1); |
|
|
::std::process::exit(1); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
let watch_only = matches.is_present("watch_only"); |
|
|
|
|
|
|
|
|
// Default one |
|
|
// Default one |
|
|
if port != 1111 && !port_is_available(port) { |
|
|
|
|
|
|
|
|
if port != 1111 && !watch_only && !port_is_available(port) { |
|
|
console::error("The requested port is not available"); |
|
|
console::error("The requested port is not available"); |
|
|
::std::process::exit(1); |
|
|
::std::process::exit(1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if !port_is_available(port) { |
|
|
|
|
|
|
|
|
if !watch_only && !port_is_available(port) { |
|
|
port = if let Some(p) = get_available_port(1111) { |
|
|
port = if let Some(p) = get_available_port(1111) { |
|
|
p |
|
|
p |
|
|
} else { |
|
|
} else { |
|
@@ -78,7 +80,6 @@ fn main() { |
|
|
::std::process::exit(1); |
|
|
::std::process::exit(1); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
let watch_only = matches.is_present("watch_only"); |
|
|
|
|
|
let output_dir = matches.value_of("output_dir").unwrap(); |
|
|
let output_dir = matches.value_of("output_dir").unwrap(); |
|
|
let base_url = matches.value_of("base_url").unwrap(); |
|
|
let base_url = matches.value_of("base_url").unwrap(); |
|
|
console::info("Building site..."); |
|
|
console::info("Building site..."); |
|
|