termux / proot-distro

An utility for managing installations of the Linux distributions in Termux.
GNU General Public License v3.0
1.8k stars 208 forks source link

[Bug]: Characters passed as arguments not expanded #368

Closed 43qcc2cn closed 12 months ago

43qcc2cn commented 12 months ago

Problem description

As far as I can tell, all characters passed as arguments are passed as literals.

For example: proot-distro login opensuse -- ls \*

returns: ls: cannot access '*': No such file or directory

Whereas starting a shell session and then running the command works OK: proot-distro login opensuse ls *

My guess is that this is due to the change made in: https://github.com/termux/proot-distro/commit/e3d0ffde0feb59e7e14248fab1b840edafec91eb

Not really sure if this a bug, or if it's just the way I'm doing things.

Is there any way to pass characters that need to be expanded?

Thanks.

What steps will reproduce the bug?

See "Problem description".

What is the expected behavior?

No response

sylirre commented 12 months ago

Use it like here:

proot-distro login DIST -- sh -c "ls /*"

This behavior absolutely comparable with Docker.