diff options
author | tokiedokie <thetokiedokie@gmail.com> | 2020-09-19 02:03:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-18 13:03:37 -0400 |
commit | 4c2920ddd7729da2555728905c22aa2ece237758 (patch) | |
tree | b8b1a9116823cc61608740cbb2cd176f16dc16eb /cli/fmt.rs | |
parent | de95fbebc467a51577c692ff7808c09d3d26fac6 (diff) |
fix(cli/fmt): canonicalize files in current dir (#7508)
Diffstat (limited to 'cli/fmt.rs')
-rw-r--r-- | cli/fmt.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/fmt.rs b/cli/fmt.rs index 16b90b1c7..2a8845290 100644 --- a/cli/fmt.rs +++ b/cli/fmt.rs @@ -236,8 +236,10 @@ pub fn collect_files( let mut target_files: Vec<PathBuf> = vec![]; if files.is_empty() { - target_files - .extend(files_in_subtree(std::env::current_dir()?, is_supported)); + target_files.extend(files_in_subtree( + std::env::current_dir()?.canonicalize()?, + is_supported, + )); } else { for arg in files { let p = PathBuf::from(arg); |