Closed hyperupcall closed 1 year ago
fwiw I get what CI gets
you can reproduce with the public docker image as well (it is mentioned in your run)
Any documentation or pointers for using the public docker image? Couldn't find anything conclusive on the website or the pacakge page or in pre-commit-ci/runner-image or in the public issues.
I tried
docker run -u $(id -u):$(id -g) -v $(pwd):/src:rw,Z --workdir /src --rm -it ghcr.io/pre-commit-ci/runner-image --help
[dumb-init] --help: No such file or directory
and
docker run -u $(id -u):$(id -g) -v $(pwd):/src:rw,Z --workdir /src --rm -it ghcr.io/pre-commit-ci/runner-image /src/pre-commit-config.yaml
[dumb-init] /src/pre-commit-config.yaml: No such file or directory
among other things
it's just a normal docker image, the command goes after the image
Oh I see, I thought it was one of those images that set the ENTRYPOINT
to the command line tool itself, and I didn't recognize the changes Docker made to PID 1 in the process namespace.
Anyways, I got things to run, but I get the same result
$ PRE_COMMIT_HOME=/src docker run -e PRE_COMMIT_HOME -u $(id -u):$(id -g) -v $(pwd):/src:rw,Z --workdir /src --rm -it ghcr.io/pre-commit-ci/runner-image:2023-03-25-6547f65 pre-commit run --all-files
prettier.................................................................Passed
So uh, idk how else to debug this unless you ran something totally different
$ docker run --rm -t -v $PWD:/src:rw -v $PWD/../pc:/pc:rw --workdir /src -u $(id -u):$(id -g) --userns=keep-id ghcr.io/pre-commit-ci/runner-image:2023-03-25-6547f65-full bash -c 'pre-commit run --all-files'
...
produces this diff:
diff --git a/src/schemas/json/tmlanguage.json b/src/schemas/json/tmlanguage.json
index 4b4bc42..e924c8b 100644
--- a/src/schemas/json/tmlanguage.json
+++ b/src/schemas/json/tmlanguage.json
@@ -1,6 +1,6 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/root",
+ "$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"root": {
"allOf": [
@@ -40,9 +40,7 @@
"type": "string"
}
},
- "required": [
- "scopeName"
- ]
+ "required": ["scopeName"]
}
]
},
@@ -64,9 +62,7 @@
}
}
},
- "required": [
- "patterns"
- ]
+ "required": ["patterns"]
},
"captures": {
"type": "object",
@@ -164,66 +160,38 @@
"begin": {
"anyOf": [
{
- "required": [
- "end"
- ]
+ "required": ["end"]
},
{
- "required": [
- "while"
- ]
+ "required": ["while"]
}
]
},
- "end": [
- "begin"
- ],
- "while": [
- "begin"
- ],
+ "end": ["begin"],
+ "while": ["begin"],
"contentName": {
"anyOf": [
{
- "required": [
- "begin",
- "end"
- ]
+ "required": ["begin", "end"]
},
{
- "required": [
- "begin",
- "while"
- ]
+ "required": ["begin", "while"]
}
]
},
"beginCaptures": {
"anyOf": [
{
- "required": [
- "begin",
- "end"
- ]
+ "required": ["begin", "end"]
},
{
- "required": [
- "begin",
- "while"
- ]
+ "required": ["begin", "while"]
}
]
},
- "whileCaptures": [
- "begin",
- "while"
- ],
- "endCaptures": [
- "begin",
- "end"
- ],
- "applyEndPatternLast": [
- "end"
- ]
+ "whileCaptures": ["begin", "while"],
+ "endCaptures": ["begin", "end"],
+ "applyEndPatternLast": ["end"]
}
},
"name": {
diff --git a/src/test/tmlanguage/tmlanguage.json b/src/test/tmlanguage/tmlanguage.json
index 45200b6..2b1a408 100644
--- a/src/test/tmlanguage/tmlanguage.json
+++ b/src/test/tmlanguage/tmlanguage.json
@@ -1,6 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
- "scopeName": "source.terminfo",
"name": "terminfo",
"patterns": [
{
@@ -16,5 +15,6 @@
}
]
}
- }
+ },
+ "scopeName": "source.terminfo"
}
Thank you for your reply! (sorry I couldn't respond earlier) It looked like I was missing the $PWD/../pc:/pc:rw
argument. The command now works and my files have properly been changed. I appreciate your help!
describe your issue
https://results.pre-commit.ci
does not show same results as localpre-commit
runs.When a PR is made, pre-commit fails with output that look like the following:
But, when I run it locally, everything works:
Of course, things work when manually running Prettier.
Here are two links to
results.pre-commit.ci
where this has occurred.More information
pre-commit --version
.pre-commit-config.yaml