about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorcsmoe <35686186+csmoe@users.noreply.github.com>2018-04-29 21:40:37 +0800
committercsmoe <35686186+csmoe@users.noreply.github.com>2018-04-29 21:40:37 +0800
commitbe3be582cc55eed27c3baf0f976dbc3f11209b10 (patch)
treebe9163ef798daf699f9d5850f45f6b3415bb3550 /src
parentfb9a5add9b651d64ecf365ade61d83d76fd6b307 (diff)
set stdin default config path to curr
Diffstat (limited to 'src')
-rw-r--r--src/bin/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs
index 0ddf2f8c3df..3cb34fb0a42 100644
--- a/src/bin/main.rs
+++ b/src/bin/main.rs
@@ -18,7 +18,7 @@ extern crate rustfmt_nightly as rustfmt;
 use std::env;
 use std::fs::File;
 use std::io::{self, stdout, Read, Write};
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
 
 use failure::err_msg;
 
@@ -182,7 +182,7 @@ fn execute(opts: &Options) -> FmtResult<(WriteMode, Summary)> {
         Operation::Stdin { input } => {
             // try to read config from local directory
             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.
             config.set().write_mode(WriteMode::Plain);