Small cleanups in scripts/:
- Comment/behavior mismatch —
config_version-r10k.rb says "first 12 characters of the commit ID" but [0...11] returns 11 (verified output: host-production-abcdef12345). Use [0...12] or fix the comment.
- Fallback can run a second interpreter — the
ruby() helper in config_version.sh:
[ -x /opt/puppetlabs/puppet/bin/ruby ] \
&& /opt/puppetlabs/puppet/bin/ruby "$@" \
|| /usr/bin/env ruby "$@"
If the preferred Ruby exists but exits non-zero, the || branch runs env ruby on the same args too. Use an if/else.
- ShellCheck warnings — obsolete
-o compound test in the usage check, and unquoted $1/$2 path expansions.
Small cleanups in
scripts/:config_version-r10k.rbsays "first 12 characters of the commit ID" but[0...11]returns 11 (verified output:host-production-abcdef12345). Use[0...12]or fix the comment.ruby()helper inconfig_version.sh:||branch runsenv rubyon the same args too. Use anif/else.-ocompound test in the usage check, and unquoted$1/$2path expansions.