Skip to content

Commit be3be58

Browse files
committed
set stdin default config path to curr
1 parent fb9a5ad commit be3be58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/bin/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extern crate rustfmt_nightly as rustfmt;
1818
use std::env;
1919
use std::fs::File;
2020
use std::io::{self, stdout, Read, Write};
21-
use std::path::PathBuf;
21+
use std::path::{Path, PathBuf};
2222

2323
use failure::err_msg;
2424

@@ -182,7 +182,7 @@ fn execute(opts: &Options) -> FmtResult<(WriteMode, Summary)> {
182182
Operation::Stdin { input } => {
183183
// try to read config from local directory
184184
let options = CliOptions::from_matches(&matches)?;
185-
let (mut config, _) = load_config(None, Some(&options))?;
185+
let (mut config, _) = load_config(Some(Path::new(".")), Some(&options))?;
186186

187187
// write_mode is always Plain for Stdin.
188188
config.set().write_mode(WriteMode::Plain);

0 commit comments

Comments
 (0)