diff options
author | Thom May <thom@may.lt> | 2017-09-18 07:42:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-18 07:42:52 +0100 |
commit | 6fcb76e55b15dd9e80925a7512115739e1938230 (patch) | |
tree | 351e2df0a8c21bd2a887aa9a0c7a002905e24ae2 /lib | |
parent | 2070d853630104e6cad1882b81d6308911baa1d0 (diff) | |
parent | 6ce923e1eea79469d2e5e2f3487c21afb6c73f80 (diff) | |
download | mixlib-cli-6fcb76e55b15dd9e80925a7512115739e1938230.tar.gz |
Merge pull request #34 from kamaradclimber/frozen_string
Avoid modification on possibly frozen string
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mixlib/cli.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mixlib/cli.rb b/lib/mixlib/cli.rb index 3c40a27..ab34b56 100644 --- a/lib/mixlib/cli.rb +++ b/lib/mixlib/cli.rb @@ -311,9 +311,10 @@ module Mixlib arguments << opt_setting[:short] if opt_setting.has_key?(:short) arguments << opt_setting[:long] if opt_setting.has_key?(:long) if opt_setting.has_key?(:description) - description = opt_setting[:description] + description = opt_setting[:description].dup description << " (required)" if opt_setting[:required] description << " (included in ['#{opt_setting[:in].join("', '")}'])" if opt_setting[:in] + opt_setting[:description] = description arguments << description end |