httptoolkit/jvm-http-proxy-agent

Attaching at Startup Example Issue: `|` would parse as a shell metacharacter on unix terminal

cryptohazey opened this issue · 2 comments

Referring to the "Attaching at Startup example", unix terminal would read | as a shell meta- character

Example Given:
java -javaagent:./agent.jar=127.0.0.1|8000|/path/to/cert.pem -jar ./application.jar

Example output on MacOS Unix terminal:

 % java -javaagent:./agent.jar=127.0.0.1|8000|/path/to/cert.pem -jar ./application.jar
zsh: no such file or directory: /path/to/cert.pem
zsh: command not found: 8000

Am i using the agent.jar the right way?

Very true! Yes in a shell you'll need to quote that option. I've just updated the example in the README:

java -javaagent:./agent.jar="127.0.0.1|8000|/path/to/cert.pem" -jar ./application.jar

I think that should resolve this, so I'll close this issue, but let me know if you're still having trouble.

Thank you!