Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] Arguments passed to exported binaries are interpred by the shell and can result in unexpected behaviours and syntax errors #1275

Closed
xoich opened this issue Mar 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@xoich
Copy link

xoich commented Mar 10, 2024

Describe the bug
Arguments passed to exported binaries when run in the host are interpreted by the shell, this makes the exported binary behave differently than when run directly in the guest, even causing shell syntax errors.

To Reproduce

  • print1 is an executable the prints its first argument as it is (#!/bin/sh\n echo "$1")
  • run print1 '--anchor="define(' in the guest, it prints --anchor="define(.
  • export it with distrobox-export --bin print1
  • run print1 '--anchor="define(' in the host, it causes this error: distrobox-enter: eval: line 614: syntax error near unexpected token '('

Expected behavior
Running print1 '--anchor="define(' in the host prints --anchor="define(

Desktop (please complete the following information):

  • Are you using podman, docker or lilipod? podman
  • Which version or podman? 4.9.3
  • Which version of distrobox? 1.7.0
  • Which host distribution? OpenSUSE Aeon
  • How did you install distrobox? Pre-installed in the OS
@xoich xoich added the bug Something isn't working label Mar 10, 2024
@xoich xoich changed the title [Error] Arguments to exported binaries are interpred by the shell and can result in unexpected behaviours and syntax errors [Error] Arguments passed to exported binaries are interpred by the shell and can result in unexpected behaviours and syntax errors Mar 10, 2024
89luca89 added a commit that referenced this issue Mar 11, 2024
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant