fixed extension checking
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0e06334057
commit
8f2e9b9add
@ -30,7 +30,7 @@ pub struct RunArgs<'a> {
|
|||||||
pub fn run(args: &RunArgs) -> Result<()> {
|
pub fn run(args: &RunArgs) -> Result<()> {
|
||||||
// parse the specification
|
// parse the specification
|
||||||
let spec: Specification = if let Some(m) = args.spec {
|
let spec: Specification = if let Some(m) = args.spec {
|
||||||
if m.ends_with(".json") {
|
if m.extension().map(|e| e == "json") == Some(true) {
|
||||||
let f = std::fs::File::open(m)?;
|
let f = std::fs::File::open(m)?;
|
||||||
Ok(serde_json::from_reader(f)?)
|
Ok(serde_json::from_reader(f)?)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user