New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix tomlv because it doesn't read from stdin #10872
Conversation
Hahaha |
if [ "$(git show "$VALIDATE_HEAD:$f" | tomlv)" ]; then | ||
badFiles+=( "$f" ) | ||
fi | ||
tomlv $f || badFiles+=( "$f" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That first $f
needs double quotes around it. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah, interesting: our comments came back because the same diff as when they were made is back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ie, this needs to be git show "$VALIDATE_HEAD:$f" | tomlv /proc/self/fd/0 || badFiles+=("$f")
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or your expanded if
which is probably easier to read and understand)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it's because I was on my other computer facepalm
On Wednesday, February 18, 2015, Tianon Gravi notifications@github.com
wrote:
In project/make/validate-toml
#10872 (comment):@@ -9,9 +9,7 @@ unset IFS
badFiles=()
for f in "${files[@]}"; do
# we use "git show" here to validate that what's committed is formatted
- if [ "$(git show "$VALIDATE_HEAD:$f" | tomlv)" ]; then
badFiles+=( "$f" )
- fi
- tomlv $f || badFiles+=( "$f" )
(or your expanded if which is probably easier to read and understand)
—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/10872/files#r24970663.
I wonder if it'd work if we passed in |
hmm let me try |
nah that doesnt work :( |
Try |
|
oh wtf how did I mistype that, |
that's bizarre, because I copy pasted from my terminal shakes fist at bash TTY handling |
it would help if i used common sense too |
👍 |
root@d1182ee8fee5:/go/src/github.com/docker/docker# cat MAINTAINERS | tomlv /proc/self/fd/0
Error in '/proc/self/fd/0': Near line 17, key 'Rules.maintainers': Near line 17: Expected a top-level item to end with a new line, comment or EOF, but got '"' instead. |
it works! and updated! |
LGTM |
I think we should probably fix the current syntax, shouldn't we? Error in 'MAINTAINERS': Near line 17, key 'Rules.maintainers': Near line 17: Expected a top-level item to end with a new line, comment or EOF, but got '"' instead. |
@@ -9,7 +9,7 @@ unset IFS | |||
badFiles=() | |||
for f in "${files[@]}"; do | |||
# we use "git show" here to validate that what's committed is formatted | |||
if [ "$(git show "$VALIDATE_HEAD:$f" | tomlv)" ]; then | |||
if [ "$(git show "$VALIDATE_HEAD:$f" | tomlv /proc/self/fd/0)" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this should probably even be checking the return value of tomlv
instead, ie:
if ! git show ...... | tomlv ... ]; then
how can i sed replace stderr because its not working :( |
that is the actual error from tomlv because it thinks /proc/... is the file lol |
6c6e21b
to
b7b1e93
Compare
Turns out with the version of tomlv we were using we were missing the commits for multiline strings BurntSushi/toml@1956abe so bumped the version and fixed the current files. |
d3857ab
to
c802a34
Compare
RUN set -x \ | ||
&& git clone https://github.com/BurntSushi/toml.git /go/src/github.com/BurntSushi/toml \ | ||
&& (cd /go/src/github.com/BurntSushi/toml && git checkout -q $TOMLV_COMMIT) \ | ||
&& go install -v github.com/BurntSushi/toml/cmd/tomlv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not going to let it block this PR, but I've filed BurntSushi/toml#74 to request a new version tag on toml
upstream to make sure we're being good citizens. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice i was going to do that too
ok updated hopefully for the last time ;) |
@thaJeztah added the GitHub username and realphabetized here :) |
@jfrazelle are you psychic? I was reading this when your comment popped up 🙀 <----- puts on tinfoil hat |
[people.mary] | ||
Name = "Mary Anthony" | ||
Email = "mary.anthony@docker.com" | ||
GitHub = "moxiegirl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mixed tabs/spaces? Indenting looks off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg my vim config gooooood catch
On Thu, Feb 19, 2015 at 1:12 PM, Sebastiaan van Stijn <
notifications@github.com> wrote:
In MAINTAINERS
#10872 (comment):@@ -531,6 +531,11 @@ made through a pull request.
Email = "lk4d4@docker.com"
GitHub = "lk4d4"
- [people.mary]
- Name = "Mary Anthony"
- Email = "mary.anthony@docker.com"
- GitHub = "moxiegirl"
Mixed tabs/spaces? Indenting looks off
—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/10872/files#r25025967.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle) Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
LGTM |
ping @crosbymichael or @LK4D4 :) |
LGTM |
fix tomlv because it doesn't read from stdin
No description provided.