Skip to content

Commit 0105304

Browse files
authored
chore(cli): use unix path separator on $schema (#4384)
1 parent 1a2e141 commit 0105304

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changes/fix-schema-path-fmt.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.js": patch
3+
"cli.rs": patch
4+
---
5+
6+
Use UNIX path separator on the init `$schema` field.

tooling/cli/src/init.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,12 @@ pub fn command(mut options: Options) -> Result<()> {
217217
let mut map = serde_json::Map::default();
218218
map.insert(
219219
"$schema".into(),
220-
serde_json::Value::String(cli_node_module_path.display().to_string()),
220+
serde_json::Value::String(
221+
cli_node_module_path
222+
.display()
223+
.to_string()
224+
.replace('\\', "/"),
225+
),
221226
);
222227
let merge_config = serde_json::Value::Object(map);
223228
json_patch::merge(&mut config, &merge_config);

0 commit comments

Comments
 (0)