Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
legal90 opened this issue Jan 22, 2018 · 0 comments
Open

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

legal90 opened this issue Jan 22, 2018 · 0 comments

Comments

@legal90
Copy link
Contributor

legal90 commented Jan 22, 2018

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 legal90 changed the title load-omnibus-toolchain.sh load-omnibus-toolchain.sh prints an error on Mac OS X Feb 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant