Skip to content

Commit

Permalink
chore(cli): use unix path separator on $schema (#4384)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jun 19, 2022
1 parent 1a2e141 commit 0105304
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/fix-schema-path-fmt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.js": patch
"cli.rs": patch
---

Use UNIX path separator on the init `$schema` field.
7 changes: 6 additions & 1 deletion tooling/cli/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,12 @@ pub fn command(mut options: Options) -> Result<()> {
let mut map = serde_json::Map::default();
map.insert(
"$schema".into(),
serde_json::Value::String(cli_node_module_path.display().to_string()),
serde_json::Value::String(
cli_node_module_path
.display()
.to_string()
.replace('\\', "/"),
),
);
let merge_config = serde_json::Value::Object(map);
json_patch::merge(&mut config, &merge_config);
Expand Down

0 comments on commit 0105304

Please sign in to comment.