Skip to content
Snippets Groups Projects

Popen (at least on OSX) expects an Array, not a String

Merged gitlab-qa-bot requested to merge github/fork/rspeicher/fix-redis-version-check into master

Created by: rspeicher

This was causing the gitlab:check task to exit prematurely with the error "System commands must be given as an array of strings."

Merge request reports

Approval is optional

Merged by avatar (Mar 9, 2025 9:34am UTC)

Merge details

  • Changes merged into master with c5f76e59.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: Razer6

    @jacobvosmaer Can you take a look?

    By Administrator on 2014-03-10T11:12:15 (imported from GitLab project)

    By Administrator on 2014-03-10T11:12:15 (imported from GitLab)

  • Created by: jacobvosmaer

    Sorry about that; we did a refactor using our new shell guidelines and we must have missed this line. Thanks for the PR @tsigo !

    By Administrator on 2014-03-10T11:17:25 (imported from GitLab project)

    By Administrator on 2014-03-10T11:17:25 (imported from GitLab)

  • Created by: Razer6

    @jacobvosmaer Thank you for your fast action. @tsigo Thank you for your PR!

    By Administrator on 2014-03-10T11:19:33 (imported from GitLab project)

    By Administrator on 2014-03-10T11:19:33 (imported from GitLab)

  • Created by: rtripault

    While this fixes the redis check, it seems there is still an error (which seems to be related to popen) using sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

    rake aborted!
    No such file or directory - rvm
    /home/git/gitlab/lib/gitlab/popen.rb:23:in `popen'
    /home/git/gitlab/lib/tasks/gitlab/task_helpers.rake:83:in `run'
    /home/git/gitlab/lib/tasks/gitlab/task_helpers.rake:73:in `run_and_match'
    /home/git/gitlab/lib/tasks/gitlab/info.rake:7:in `block (3 levels) in <top (required)>'
    Tasks: TOP => gitlab:env:info
    (See full trace by running task with --trace)

    By Administrator on 2014-03-10T11:58:11 (imported from GitLab project)

    By Administrator on 2014-03-10T11:58:11 (imported from GitLab)

  • Created by: MrKeiKun

    https://github.com/gitlabhq/gitlabhq/issues/6502

    By Administrator on 2014-03-10T15:21:29 (imported from GitLab project)

    By Administrator on 2014-03-10T15:21:29 (imported from GitLab)

  • Created by: jacobvosmaer

    @rtripault what happens if you make this change? It runs RVM in a shell.

    diff --git a/lib/tasks/gitlab/info.rake b/lib/tasks/gitlab/info.rake
    index 690f414..69d44c0 100644
    --- a/lib/tasks/gitlab/info.rake
    +++ b/lib/tasks/gitlab/info.rake
    @@ -4,7 +4,7 @@ namespace :gitlab do
         task info: :environment  do
    
           # check if there is an RVM environment
    -      rvm_version = run_and_match(%W(rvm --version), /[\d\.]+/).try(:to_s)
    +      rvm_version = run_and_match(%W(sh -c rvm\ --version), /[\d\.]+/).try(:to_s)
           # check Ruby version
           ruby_version = run_and_match(%W(ruby --version), /[\d\.p]+/).try(:to_s)
           # check Gem version

    By Administrator on 2014-03-10T16:21:54 (imported from GitLab project)

    By Administrator on 2014-03-10T16:21:54 (imported from GitLab)

  • Created by: rtripault

    @jacobvosmaer no more errors, thanks :thumbsup:

    By Administrator on 2014-03-10T16:33:58 (imported from GitLab project)

    By Administrator on 2014-03-10T16:33:58 (imported from GitLab)

  • Created by: jacobvosmaer

    @rtripault I forgot to ask: are you using RVM at all?

    By Administrator on 2014-03-10T16:58:02 (imported from GitLab project)

    By Administrator on 2014-03-10T16:58:02 (imported from GitLab)

  • Created by: rtripault

    nope, no RVM here

    By Administrator on 2014-03-10T18:05:04 (imported from GitLab project)

    By Administrator on 2014-03-10T18:05:04 (imported from GitLab)

  • Created by: MrKeiKun

    no RVM here too

    By Administrator on 2014-03-10T18:34:56 (imported from GitLab project)

    By Administrator on 2014-03-10T18:34:56 (imported from GitLab)

  • Created by: jacobvosmaer

    The RVM check error should be fixed by ad71eca8 .

    By Administrator on 2014-03-12T12:26:54 (imported from GitLab project)

    By Administrator on 2014-03-12T12:26:54 (imported from GitLab)

Please register or sign in to reply
Loading