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

Closed
aivarsk opened this issue Jul 19, 2019 · 0 comments
Closed

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

aivarsk opened this issue Jul 19, 2019 · 0 comments
Labels
type: bug A general bug
Milestone

Comments

@aivarsk
Copy link

aivarsk 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)"
	export SPRING_HOME
	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 <http://gnu.org/licenses/gpl.html>

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 a.sh
echo "`pwd`"
cd "`pwd`" >&-
echo "`pwd`"

-bash-4.3$ bash a.sh
/cspbd/64bit-powerpc-aix7.1-gcc4.8-ora12.1-tux12.1-s-rx13/cs.platform.WD2-1.13.1.3/src/cs.mp.vtis-0.0.25/spring-cloud-cli
a.sh: line 3: pwd: write error: A file descriptor does not refer to an open file.
a.sh: line 3: echo: write error: A file descriptor does not refer to an open file.
-bash-4.3$
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 19, 2019
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 19, 2019
@wilkinsona wilkinsona added this to the 2.1.x milestone Jul 19, 2019
@wilkinsona wilkinsona modified the milestones: 2.1.x, 2.1.8 Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants