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

Sh action adding a backslash to redirect '>' character #77

Open
matthewweldon opened this issue Jul 2, 2019 · 1 comment
Open

Sh action adding a backslash to redirect '>' character #77

matthewweldon opened this issue Jul 2, 2019 · 1 comment

Comments

@matthewweldon
Copy link

matthewweldon commented Jul 2, 2019

I have a sh action like this in my fastfile:

sh("echo", someString, ">", "Output.txt")

This action is intended to take a string and put it in Output.txt, which is used by other processes.

However The output in terminal from running the lane shows a backslash is getting added to the command:

 -------------------------------------
[13:59:49]: --- Step: echo someString \> Output.txt ---
[13:59:49]: -------------------------------------
[13:59:49]: $ echo someString \> Output.txt
[13:59:49]: ▸ someString > Output.txt

The backslash is getting put into the echo command escaped and is not being used to redirect the Output.txt file, so the out

I feel like I'm missing something obvious, any help is appreciated, I've tried digging into the gem that generates the bash command but I couldn't track down the culprit

@realnumber
Copy link

I had the same problem w/ circleci/android:api-29-node image and this solved the issue for me.

sh("echo", someString, ">", "Output.txt") #before
sh "echo " +  someString + " > Output.txt" #after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants