Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Conversation

@dumbbell
Copy link
Contributor

@dumbbell dumbbell commented Oct 7, 2020

The set command in the implementation of /bin/sh included in the official RabbitMQ Docker image returns multi-line variable values differently than the tested Bourne shell implementation (GNU Bash, dash and FreeBSD sh).

I don't know what implementation is used by that Docker image, but here is the output of set, for a variable set to "\n'test'":

TEST_VAR='
'"'"'test'"'"

The problem was reported in the following discussion:
rabbitmq/rabbitmq-server#2458

While here, add a small testcase to check a couple outputs.

The `set` command in the implementation of `/bin/sh` included in the
official RabbitMQ Docker image returns multi-line variable values
differently than the tested Bourne shell implementation (GNU Bash, dash
and FreeBSD sh).

I don't know what implementation is used by that Docker image, but here
is the output of `set`, for a variable set to "\n'test'":

    TEST_VAR='
    '"'"'test'"'"

The problem was reported in the following discussion:
rabbitmq/rabbitmq-server#2458

While here, add a small testcase to check a couple outputs.
@lukebakken
Copy link
Contributor

Since you have Docker up and running, can you see what shell and version is being used for /bin/sh? I just set /bin/sh to dash on my workstation but I don't see the funky output 🤷‍♂️

@dumbbell
Copy link
Contributor Author

dumbbell commented Oct 7, 2020

Since you have Docker up and running, can you see what shell and version is being used for /bin/sh? I just set /bin/sh to dash on my workstation but I don't see the funky output man_shrugging

I just verified and it's dash indeed, from some version of Ubuntu I guess. I never saw that output on the different versions of Debian I tested.

@lukebakken
Copy link
Contributor

Interesting. It must be fixed in the version I'm using.

@dumbbell dumbbell marked this pull request as ready for review October 12, 2020 09:15
@dumbbell dumbbell merged commit 23191bb into master Oct 12, 2020
@dumbbell dumbbell deleted the fix-conf_env_file-output-parsing branch October 12, 2020 09:21
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants