mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-03 13:23:10 +00:00
Fix prettier formatting in schema store update script (#11881)
How was this working for anyone else? The `prettier` path did not exist on my machine. Also added `--force` to the push because otherwise you can't re-run the script for a given Ruff commit.
This commit is contained in:
parent
2d6d85e993
commit
c50577f1d7
1 changed files with 3 additions and 3 deletions
|
|
@ -79,7 +79,7 @@ def update_schemastore(
|
||||||
|
|
||||||
# Run npm install
|
# Run npm install
|
||||||
src = schemastore_path.joinpath("src")
|
src = schemastore_path.joinpath("src")
|
||||||
check_call(["npm", "install"], cwd=src)
|
check_call(["npm", "install"], cwd=schemastore_path)
|
||||||
|
|
||||||
# Update the schema and format appropriately
|
# Update the schema and format appropriately
|
||||||
schema = json.loads(root.joinpath("ruff.schema.json").read_text())
|
schema = json.loads(root.joinpath("ruff.schema.json").read_text())
|
||||||
|
|
@ -89,7 +89,7 @@ def update_schemastore(
|
||||||
)
|
)
|
||||||
check_call(
|
check_call(
|
||||||
[
|
[
|
||||||
"node_modules/.bin/prettier",
|
"../node_modules/prettier/bin/prettier.cjs",
|
||||||
"--plugin",
|
"--plugin",
|
||||||
"prettier-plugin-sort-json",
|
"prettier-plugin-sort-json",
|
||||||
"--write",
|
"--write",
|
||||||
|
|
@ -121,7 +121,7 @@ def update_schemastore(
|
||||||
)
|
)
|
||||||
# This should show the link to create a PR
|
# This should show the link to create a PR
|
||||||
check_call(
|
check_call(
|
||||||
["git", "push", "--set-upstream", "origin", branch],
|
["git", "push", "--set-upstream", "origin", branch, "--force"],
|
||||||
cwd=schemastore_path,
|
cwd=schemastore_path,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue