Skip to content

contrib/completion: bash nounset mode fixes#3965

Merged
thaJeztah merged 1 commit into
docker:masterfrom
scop:fix/bash-completion-nounset
Feb 6, 2023
Merged

contrib/completion: bash nounset mode fixes#3965
thaJeztah merged 1 commit into
docker:masterfrom
scop:fix/bash-completion-nounset

Conversation

@scop

@scop scop commented Jan 12, 2023

Copy link
Copy Markdown
Contributor

- What I did

Fixed all instances I've come across that produce errors with the bash completion and the shell in nounset mode.

- How I did it

Guarded variable accesses like ${something-} instead of directly accessing $something or ${something} where the variable can be unset.

- How to verify it

Set bash in nounset mode (set -u or set -o nounset), use the bash completion. Observe errors before this PR, no errors after.

- Description for the changelog

A number of problems using the bash completion with the shell in nounset mode have been fixed.

- A picture of a cute animal (not mandatory but encouraged)

:=}

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #3965 (2753057) into master (f1f12a3) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3965   +/-   ##
=======================================
  Coverage   59.20%   59.20%           
=======================================
  Files         287      287           
  Lines       24690    24690           
=======================================
  Hits        14617    14617           
  Misses       9189     9189           
  Partials      884      884           

@vvoland vvoland left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks!

@albers albers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution.

@thaJeztah thaJeztah added this to the v-next milestone Feb 6, 2023
@thaJeztah thaJeztah merged commit 6872164 into docker:master Feb 6, 2023
@scop scop deleted the fix/bash-completion-nounset branch February 6, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants