Skip to content
Snippets Groups Projects
Commit c4d5a457aff1 authored by Stan Hu's avatar Stan Hu
Browse files

Suppress Ruby experimental features warning messages

The Remote Development codebase uses Ruby's experimental pattern
matching syntax
(https://docs.ruby-lang.org/en/3.0/syntax/pattern_matching_rdoc.html).
As a result, booting `gitlab-rails console` shows a stream of these
warnings at compile-time:

```
warning: One-line pattern matching is experimental, and the behavior
may change in future versions of Ruby!
```

Let's just squelch these warnings for now since they're development
warnings, and CI should catch issues if this breaks.

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/420811

Changelog: fixed
parent 6d4184fb168d
No related branches found
No related tags found
3 merge requests!114heptapod#1394: making 1.0 the oldstable,!110heptapod#1352: merged heptapod branch into heptapod-stable,!106Merged upstream 16.4 branching point into heptapod branch
......@@ -40,4 +40,7 @@
privilege_drop="-u ${gitlab_user}:${gitlab_group}"
fi
exec <%= install_dir %>/embedded/bin/chpst -e <%= install_dir %>/etc/gitlab-rails/env ${privilege_drop} -U ${gitlab_user}:${gitlab_group} <%= install_dir %>/embedded/bin/bundle exec <%= command %>
# Suppress one-line pattern matching warnings: https://gitlab.com/gitlab-org/gitlab/-/issues/420811
rubyopt="RUBYOPT=-W:no-experimental"
exec <%= install_dir %>/embedded/bin/chpst -e <%= install_dir %>/etc/gitlab-rails/env ${privilege_drop} -U ${gitlab_user}:${gitlab_group} /usr/bin/env ${rubyopt} <%= install_dir %>/embedded/bin/bundle exec <%= command %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment