Trying to run a series of bash commands on Windows but failed #236
Answered
by
citystrawman
citystrawman
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
citystrawman
Apr 4, 2024
Replies: 2 comments 3 replies
-
Now, I even tried hard coding:
but still got same errors. However, if I paste the argstr manually into bash, it runs successfully. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm pretty sure you need to do var result = await Cli.Wrap(bashPath)
.WithArguments(args => args
.Add("-c")
.Add(new ArgumentsBuilder()
.Add($"export FREESURFER_HOME={sourceScriptDirWsl}")
.Add(" ; ")
.Add("source $FREESURFER_HOME/SetUpFreeSurfer.sh")
.Add(" ; ")
.Add(stripPathWsl)
.Add("-i")
.Add(inputPathWsl)
.Add("-o")
.Add(outputPathWsl)
.Build()
)
).ExecuteBufferedAsync(cts.Token); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! I found that by using
new ArgumentsBuilder()
the string has double quotes, thus I just use hard-coded string and now it works.Thank you so much!