2.068.0 std.process.executeShell how to set the shell?
albatroz via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Sep 2 08:28:35 PDT 2015
On Wednesday, 2 September 2015 at 01:46:18 UTC, Jonathan M Davis
wrote:
> On Wednesday, 2 September 2015 at 01:26:23 UTC, Jonathan M
> Davis wrote:
> [snip]
>
> https://issues.dlang.org/show_bug.cgi?id=15000
>
> - Jonathan M Davis
Thank you for your reply and for the bug report.
Looking at your suggestions I do not fully understand/agree.
executeShell has been one of the easiest ways for us to interact
with the shell, all other functions require more work to
implement. Being able to define the shell to be used is something
that makes sense across all functions in std.process.
Honestly being able to set a different variable name instead of
SHELL would make more sense. It would not take the default shell
from the user thus using /bin/sh and would allow us to change it
if desired with a different value. The change would be minimal
across code and documentation.
But that's just my suggestion, I'm not a library developer. I
understand that all variants may have their own issues, but
taking away from the developer the power to make decisions also
doesn't seem a good option.
Anyway I would like to ask if you can help to understand why this
simple example using execute fails?
auto outputDiff = execute ( ["bash","echo"] );
writeln (outputDiff.output);
Output:
/bin/echo: /bin/echo: cannot execute binary file
At the moment some of the uses I had are not working and I'm not
able to implement any workaround.
Obrigado
More information about the Digitalmars-d-learn
mailing list