How to copy files from intercept

I use intercept command to find what goes wrong. Sometimes it is hard to check, because output files are not plain text, and I want to copy artifact files to my computer, and investigate it on my pc. Is there simple way to copy files from concourse container?

In case someone finds it useful, here is how I copy text files from a build container to my local machine:

fly -t ci intercept -b 7 -s my-tests cat /var/log/stuff.log > /tmp/stuff.log

I guess it can work with binary files, too.

1 Like

Thank you, I try it next time.

Seems not works.

fly -t my_target intercept --job develop/build --step Gradle cat /tmp/1

error: unknown flag tmp/1’`

With quotes not works too:

fly -t my_target intercept --job develop/build --step Gradle cat "/tmp/1"

Backend error: Exit status: 500, message: {"Type":"ExecutableNotFoundError","Message":"exec failed: container_linux.go:346: starting container process caused \"exec: \\\"cat /tmp/1\\\": stat cat /tmp/1: no such file or directory\"","Handle":"","ProcessID":"","Binary":""}

Maybe some other command parameters?