omnibus icon indicating copy to clipboard operation
omnibus copied to clipboard

load-omnibus-toolchain.sh prints an error on Mac OS X

Open legal90 opened this issue 6 years ago • 0 comments

Cookbook version

5.3.3

Chef-client version

13.6.4

Platform Details

OS X 10.10 Yosemite

Scenario:

Converge a clean node with omnibus::default recipe.

Steps to Reproduce:

After the node is converged, log in there and try to initialize the environment:

source ~/load-omnibus-toolchain.sh

Actual Result:

========================================
= Environment
========================================

env: illegal option -- 0
usage: env [-i] [name=value ...] [utility [argument ...]]


========================================
= Tool Versions
========================================

Bash.........GNU bash, version 4.3.30(1)-release (x86_64-apple-darwin14.5.0)
Bundler......Bundler version 1.16.0
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
GCC..........Apple LLVM version 7.0.2 (clang-700.1.81)
Git..........git version 2.14.1
Make.........GNU Make 4.1
Ruby.........ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin14]
RubyGems.....2.6.14

Expected Result:

env is printed properly, no error message is displayed.

Description

This "error" is minor and actually doesn't affect the script behavior (except the printed output). But maybe it could be easily fixed just by adding an if condition to the script, so -0 will not be interpolated if the OS is Darwin? Here is how it will without -0:

$ source ~/load-omnibus-toolchain.sh

========================================
= Environment
========================================

SSL_CERT_FILE=/opt/omnibus-toolchain/embedded/ssl/certs/cacert.pem
TERM=xterm
SHELL=/opt/omnibus-toolchain/bin/bash
TMPDIR=/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/
SSH_CLIENT=10.211.55.2 56328 22
OMNIBUS_TOOLCHAIN_INSTALL_DIR=/opt/omnibus-toolchain
OLDPWD=/Users/vagrant
SSH_TTY=/dev/ttys000
USER=vagrant
MAIL=/var/mail/vagrant
PATH=/opt/omnibus-toolchain/bin:/usr/local/bin:/opt/omnibus-toolchain/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/vagrant/ast
SHLVL=1
HOME=/Users/vagrant
LOGNAME=vagrant
SSH_CONNECTION=10.211.55.2 56328 10.211.55.237 22
_=/usr/bin/env

<...>

legal90 avatar Jan 22 '18 15:01 legal90