Rollup merge of #80026 - JohnTitor:separator-insensitive, r=Mark-Simulacrum

expand-yaml-anchors: Make the output directory separator-insensitive

Fixes #75709
This commit is contained in:
Yuki Okushi 2020-12-17 11:44:01 +09:00 committed by GitHub
commit f645e30268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -87,7 +87,8 @@ impl App {
let content = std::fs::read_to_string(source)
.with_context(|| format!("failed to read {}", self.path(source)))?;
let mut buf = HEADER_MESSAGE.replace("{source}", &self.path(source).to_string());
let mut buf =
HEADER_MESSAGE.replace("{source}", &self.path(source).to_string().replace("\\", "/"));
let documents = YamlLoader::load_from_str(&content)
.with_context(|| format!("failed to parse {}", self.path(source)))?;