containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
7.98k stars 595 forks source link

Fix check for empty $HOME and $XDG_RUNTIME_DIR #3137

Closed abitrolly closed 3 months ago

abitrolly commented 3 months ago

If $XDG_RUNTIME_DIR is not set, then [ -w $XDG_RUNTIME_DIR ] passes.

Quotes fix the issue.

shellcheck was able to detect this, but fails to explain what happens (https://github.com/koalaman/shellcheck/issues/3006).

fahedouch commented 3 months ago

there are some linter warnings (out-of-scope), could please fix them in a new commit. Thanks

abitrolly commented 3 months ago

@fahedouch done in #3138.