Replies: 6 comments
-
|
Thanks @Scafir for the issue! I'm not completely sure that using the login shell solves all the escaping/globbing problems:
the glob is still resolved by the main shell before calling sh, you need to escape that glob anyway, and we're back to square one :) the shell that calls the exec is known, and it's |
Beta Was this translation helpful? Give feedback.
-
|
One thing that the login shell helps with, is dealing with environment variables and isolated environments as described in this issue #656, towards the bottom of it. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @89luca89, I believe that the current globbing mechanism is fine: when working inside a certain shell, I expect that globbing works the same across all input commands, even if those commands are forwarded to other shells later on. Do you agree? Concerning escaping: in my proposition, the escaping problem is solved by using the somewhat strange I should also thank you for all your work on this tool, I've been very happy using it and made a small presentation about it at CERN which was quite well received :) |
Beta Was this translation helpful? Give feedback.
-
|
@Scafir I've just commented the PR, I think we can switch to an "always-login" mode, but I'd like to keep the current "globbing management"
Saw that! Thanks to you for the presentation and suggesting it! 😄 |
Beta Was this translation helpful? Give feedback.
-
|
Hi! I have "npx" program exported A simple script: When you launch it from the host, if you fill to the "read" command a query like SELECT * FROM, the wildcard character will have an interpolation with your files names. Also, the problem is the same in command line, if you call this script like this: ./test.sh 'SELECT * FROM' The single quote in command line should prevent glob interpolation, as the double quotes around the $1 in the bash script. I've also tried to uses "set -f" or "shopt" but this doesn't works. If I enter inside the container, then the scripts works as expected. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @89luca89, first of all, thanks a lot for developing such a great tool! I noticed that with latest Distrobox 1.8.1.2, Lines 267 to 282 in 71cf829 I'm not sure I fully understand all the code in there but I'm sure that if we don't specify |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Following the discussion with @fredizzimo in #651, I think that it is best to discuss how to tackle the exported binaries.
First of all, let me write down the goal (in my opinion) that we should strive for with binaries export:
"Exported binaries should produce the same result than the same command run from inside the distrobox"
To reach this goal, I suggest using a login shell by default, as not using it may only cause hard to debug issues, with no clear advantage.
I would also argue that using a login shell and executing the command within that also solve an issue raised in the original merge request: in what shell should the command be run?
There are three level to this:
I would argue that number 2 is not actually important, as no matter the shell, the end result should be the same.
This allows us to use a single shell for all use case inside the exported script. This is a big advantage over using $SHELL, as it allows us to avoid having to determine what syntax should be used (e.g: fish does not use
$@).Being careful avoiding issues with binary files that may not be executed with a simple
sh -l myBinaryFile, we would get a end result along the lines of:I will most likely submit a merge request for this, do not hesitate to let me hear your thoughts.
Beta Was this translation helpful? Give feedback.
All reactions