Move feature flag checking into a single function

This commit is contained in:
Brian Cain 2018-12-07 10:59:21 -08:00
parent d551738bc7
commit c07f99fe7d
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
1 changed files with 2 additions and 2 deletions

View File

@ -9,8 +9,8 @@ module Vagrant
# @return [Boolean]
def global_enabled?
if !defined?(@_experimental)
experimental = ENV["VAGRANT_EXPERIMENTAL"].to_s
if experimental != "0" && !experimental.empty?
experimental = features_requested
if experimental.size >= 1 && experimental.first != "0"
@_experimental = true
else
@_experimental = false