set stdin default config path to curr
This commit is contained in:
parent
fb9a5add9b
commit
be3be582cc
@ -18,7 +18,7 @@
|
|||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::{self, stdout, Read, Write};
|
use std::io::{self, stdout, Read, Write};
|
||||||
use std::path::PathBuf;
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use failure::err_msg;
|
use failure::err_msg;
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ fn execute(opts: &Options) -> FmtResult<(WriteMode, Summary)> {
|
|||||||
Operation::Stdin { input } => {
|
Operation::Stdin { input } => {
|
||||||
// try to read config from local directory
|
// try to read config from local directory
|
||||||
let options = CliOptions::from_matches(&matches)?;
|
let options = CliOptions::from_matches(&matches)?;
|
||||||
let (mut config, _) = load_config(None, Some(&options))?;
|
let (mut config, _) = load_config(Some(Path::new(".")), Some(&options))?;
|
||||||
|
|
||||||
// write_mode is always Plain for Stdin.
|
// write_mode is always Plain for Stdin.
|
||||||
config.set().write_mode(WriteMode::Plain);
|
config.set().write_mode(WriteMode::Plain);
|
||||||
|
Loading…
Reference in New Issue
Block a user