Skip to content

Commit 9c594af

Browse files
committed
[bfops/run-dotnet-format]: comment
1 parent 87b0e77 commit 9c594af

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

crates/cli/src/tasks/csharp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ pub(crate) fn build_csharp(project_path: &Path, build_debug: bool) -> anyhow::Re
110110

111111
pub(crate) fn dotnet_format(project_dir: &PathBuf, files: impl IntoIterator<Item = PathBuf>) -> anyhow::Result<()> {
112112
let cwd = std::env::current_dir().unwrap_or_else(|_| project_dir.clone());
113+
// Resolve absolute paths for all of the files, because we receive them as relative paths to cwd, but
114+
// `dotnet format` will interpret those paths relative to `project_dir`.
113115
let files: Vec<OsString> = files
114116
.into_iter()
115117
.map(|f| {

0 commit comments

Comments
 (0)