microsoft / vscode-docker-extensibility

Docker for Visual Studio Code: Extensibility Model
MIT License
10 stars 4 forks source link

Listing files failing with errors: stat: cannot statx '/home/.*': No such file or directory #231

Closed DreamNik closed 1 month ago

DreamNik commented 1 month ago

Looks like this method doesn't work on OS that have different behavior on wildcard expansion:

https://github.com/microsoft/vscode-docker-extensibility/blob/759aefe83ed6af599db22fd6c4db963ff40c6323/packages/vscode-container-client/src/clients/DockerClientBase/DockerClientBase.ts#L1611

Default behavior on ArchLinux is not to include "." and ".." when expanding wildcards:

$ echo /home/.*
/home/.*

But when reverting this option we have anticipated by this method behavior:

$ shopt -u globskipdots
$ echo /home/.*
/home/. /home/..

Steps to reproduce: 1) Run ArchLinux container 2) Use microsoft/vscode-docker extension to browse files in container 3) Have error on every attempt to dive into any top-level folder

Expected behavior: 1) Run ArchLinux container 2) Use microsoft/vscode-docker extension to browse files in container 3) Have files correctly displayed

DreamNik commented 1 month ago

This probably relates to new bash 5.2 behavior:

aa. The new `globskipdots' shell option forces pathname expansion never to
    return `.' or `..' unless explicitly matched. It is enabled by default.

source: https://github.com/bminor/bash/blob/master/CHANGES