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

"spring" shell script error on AIX Bash 4.3.0 #17579

aivarsk opened this issue Jul 19, 2019 · 0 comments


Copy link

commented Jul 19, 2019

spring-boot-project/spring-boot-cli/src/main/executablecontent/bin/spring has following weird commands:

	cd "$(dirname "${PRG}")/../" >&- || exit 1
	SPRING_HOME="$(pwd -P)"
	cd "$SAVED" >&- || exit 1

If I understand bash correctly, ">&-" means to close stdout. I think a more typical approach is to redirect stdout to /dev/null. As a result, we have problems with Bash 4.3 running on AIX. Not sure if that's bash or AIX or combination of both but doing a redirect to /dev/null instead helps.

Here's how I reproduced the problem:

-bash-4.3$ bash --version
GNU bash, version 4.3.0(1)-release (powerpc-ibm-aix7.1.0.0)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

-bash-4.3$ cat
echo "`pwd`"
cd "`pwd`" >&-
echo "`pwd`"

-bash-4.3$ bash
/cspbd/64bit-powerpc-aix7.1-gcc4.8-ora12.1-tux12.1-s-rx13/cs.platform.WD2- line 3: pwd: write error: A file descriptor does not refer to an open file. line 3: echo: write error: A file descriptor does not refer to an open file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.