fix: install args empty
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -626,7 +626,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "runrs"
|
name = "runrs"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"rust_util",
|
"rust_util",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "runrs"
|
name = "runrs"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
description = "A Tool for Run Rust Scripts"
|
description = "A Tool for Run Rust Scripts"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const SCRIPT_PATTERN: &'static str = "https://git.hatter.ink/rust-scripts/script
|
|||||||
|
|
||||||
pub fn install_script(args: Vec<&String>) {
|
pub fn install_script(args: Vec<&String>) {
|
||||||
if args.is_empty() {
|
if args.is_empty() {
|
||||||
failure!("No script name assigned!");
|
failure_and_exit!("No script name assigned!");
|
||||||
}
|
}
|
||||||
let script_name = &args[0];
|
let script_name = &args[0];
|
||||||
let normalized_script_name = if script_name.ends_with(".rs") {
|
let normalized_script_name = if script_name.ends_with(".rs") {
|
||||||
|
|||||||
Reference in New Issue
Block a user