Skip to content

Update Dockerfile-debian.template#1401

Open
agibalovsa wants to merge 1 commit intodocker-library:masterfrom
agibalovsa:patch-1
Open

Update Dockerfile-debian.template#1401
agibalovsa wants to merge 1 commit intodocker-library:masterfrom
agibalovsa:patch-1

Conversation

@agibalovsa
Copy link

Correct variable checking, otherwise an error will occur for the set -u mode

Correct variable checking, otherwise an error will occur for the set -u mode
rm -rf /var/lib/apt/lists/*; \
\
if [ -n "$tempDir" ]; then \
if [ -v "tempDir" ]; then \
Copy link
Member

Choose a reason for hiding this comment

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

I like the sentiment, but I'd prefer to keep -n and handle -u with ${...:-} instead:

Suggested change
if [ -v "tempDir" ]; then \
if [ -n "${tempDir:-}" ]; then \

(This also needs ./apply-templates.sh run so that this change applies outward to all our Dockerfiles)

Copy link
Author

Choose a reason for hiding this comment

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

Thx. I like your solution.

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

Successfully merging this pull request may close these issues.

2 participants