Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Okstad <pokstad@gitlab.com>2020-08-25 21:39:24 +0300
committerPaul Okstad <pokstad@gitlab.com>2020-08-25 21:39:24 +0300
commite4ff30e44b6ac21f33290bbe7a9cbbd42f98d4d1 (patch)
treecb8080363a7d7fb75386ef7d968bd945c21cbda7
parent1a8d2803b47def6692bed11fcb954f4243809c39 (diff)
parent42a208d5fbed5bb4fa8d178b48625c8738b1c725 (diff)
Merge branch 'pks-linguist-execution' into 'master'
Fix potentially executing linguist with wrong version of bundle Closes #3085 See merge request gitlab-org/gitaly!2495
-rw-r--r--changelogs/unreleased/pks-linguist-execution.yml5
-rw-r--r--internal/linguist/linguist.go7
2 files changed, 11 insertions, 1 deletions
diff --git a/changelogs/unreleased/pks-linguist-execution.yml b/changelogs/unreleased/pks-linguist-execution.yml
new file mode 100644
index 000000000..c5c19ec97
--- /dev/null
+++ b/changelogs/unreleased/pks-linguist-execution.yml
@@ -0,0 +1,5 @@
+---
+title: Fix potentially executing linguist with wrong version of bundle
+merge_request: 2495
+author:
+type: fixed
diff --git a/internal/linguist/linguist.go b/internal/linguist/linguist.go
index 523fe9e6a..44a7fd7ac 100644
--- a/internal/linguist/linguist.go
+++ b/internal/linguist/linguist.go
@@ -74,8 +74,13 @@ func LoadColors(cfg config.Cfg) error {
}
func startGitLinguist(ctx context.Context, repoPath string, commitID string, linguistCommand string) (*command.Command, error) {
+ bundle, err := exec.LookPath("bundle")
+ if err != nil {
+ return nil, err
+ }
+
args := []string{
- "bundle",
+ bundle,
"exec",
"bin/ruby-cd",
repoPath,