Skip to content

Commit

Permalink
fix(gomod): reduce escaped quotation marks in docker run
Browse files Browse the repository at this point in the history
Closes #5459
  • Loading branch information
rarkins committed Feb 15, 2020
1 parent b04c825 commit f7d1bb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/manager/gomod/__snapshots__/artifacts.spec.ts.snap
Expand Up @@ -74,7 +74,7 @@ Array [
},
},
Object {
"cmd": "docker run --rm --user=foobar -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/renovate/cache\\":\\"/tmp/renovate/cache\\" -v \\"/tmp/renovate/cache/others/go\\":\\"/tmp/renovate/cache/others/go\\" -e GOPATH -e GOPROXY -e GONOSUMDB -e CGO_ENABLED -w \\"/tmp/github/some/repo\\" renovate/go bash -l -c \\"git config --global url.\\\\\\\\\\\\\\"https://some-token@github.com/\\\\\\\\\\\\\\".insteadOf \\\\\\\\\\\\\\"https://github.com/\\\\\\\\\\\\\\" && go get -d ./...\\"",
"cmd": "docker run --rm --user=foobar -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/renovate/cache\\":\\"/tmp/renovate/cache\\" -v \\"/tmp/renovate/cache/others/go\\":\\"/tmp/renovate/cache/others/go\\" -e GOPATH -e GOPROXY -e GONOSUMDB -e CGO_ENABLED -w \\"/tmp/github/some/repo\\" renovate/go bash -l -c \\"git config --global url.\\\\\\"https://some-token@github.com/\\\\\\".insteadOf \\\\\\"https://github.com/\\\\\\" && go get -d ./...\\"",
"options": Object {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
Expand Down Expand Up @@ -105,7 +105,7 @@ Array [
},
},
Object {
"cmd": "docker run --rm --user=foobar -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/renovate/cache\\":\\"/tmp/renovate/cache\\" -v \\"/tmp/renovate/cache/others/go\\":\\"/tmp/renovate/cache/others/go\\" -e GOPATH -e GOPROXY -e GONOSUMDB -e CGO_ENABLED -w \\"/tmp/github/some/repo\\" renovate/go bash -l -c \\"git config --global url.\\\\\\\\\\\\\\"https://x-access-token:some-token@github.com/\\\\\\\\\\\\\\".insteadOf \\\\\\\\\\\\\\"https://github.com/\\\\\\\\\\\\\\" && go get -d ./...\\"",
"cmd": "docker run --rm --user=foobar -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/renovate/cache\\":\\"/tmp/renovate/cache\\" -v \\"/tmp/renovate/cache/others/go\\":\\"/tmp/renovate/cache/others/go\\" -e GOPATH -e GOPROXY -e GONOSUMDB -e CGO_ENABLED -w \\"/tmp/github/some/repo\\" renovate/go bash -l -c \\"git config --global url.\\\\\\"https://x-access-token:some-token@github.com/\\\\\\".insteadOf \\\\\\"https://github.com/\\\\\\" && go get -d ./...\\"",
"options": Object {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
Expand All @@ -125,7 +125,7 @@ Array [
},
},
Object {
"cmd": "docker run --rm --user=foobar -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/renovate/cache\\":\\"/tmp/renovate/cache\\" -v \\"/tmp/renovate/cache/others/go\\":\\"/tmp/renovate/cache/others/go\\" -e GOPATH -e GOPROXY -e GONOSUMDB -e CGO_ENABLED -w \\"/tmp/github/some/repo\\" renovate/go bash -l -c \\"git config --global url.\\\\\\\\\\\\\\"https://x-access-token:some-token@github.com/\\\\\\\\\\\\\\".insteadOf \\\\\\\\\\\\\\"https://github.com/\\\\\\\\\\\\\\" && go mod tidy\\"",
"cmd": "docker run --rm --user=foobar -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/renovate/cache\\":\\"/tmp/renovate/cache\\" -v \\"/tmp/renovate/cache/others/go\\":\\"/tmp/renovate/cache/others/go\\" -e GOPATH -e GOPROXY -e GONOSUMDB -e CGO_ENABLED -w \\"/tmp/github/some/repo\\" renovate/go bash -l -c \\"git config --global url.\\\\\\"https://x-access-token:some-token@github.com/\\\\\\".insteadOf \\\\\\"https://github.com/\\\\\\" && go mod tidy\\"",
"options": Object {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/gomod/artifacts.ts
Expand Up @@ -20,7 +20,7 @@ function getPreCommands(): string[] | null {
? `x-access-token:${credentials.token}`
: credentials.token;
preCommands = [
`git config --global url.\\\\"https://${token}@github.com/\\\\".insteadOf \\\\"https://github.com/\\\\"`,
`git config --global url.\"https://${token}@github.com/\".insteadOf \"https://github.com/\"`, // eslint-disable-line no-useless-escape
];
}
return preCommands;
Expand Down

0 comments on commit f7d1bb3

Please sign in to comment.