paradigmxyz / artemis

A simple, modular, and fast framework for writing MEV bots in Rust.
Apache License 2.0
2.31k stars 442 forks source link

Counterintuitive handling of relative paths in CLI tool #32

Closed jmcph4 closed 1 year ago

jmcph4 commented 1 year ago

As of b1e0a9d, Artemis' CLI tool exhibits counterintuitive behaviour when given relative directories as roots for generating strategies from templates:

$ uname -a
Linux mybox 5.10.0-23-rt-amd64 #1 SMP PREEMPT_RT Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux
$ pwd
/home/johndoe
$ mkdir -p foo/bar
$ cd foo/bar
$ git clone git@github.com:paradigmxyz/artemis.git
$ cd artemis
$ git rev-parse HEAD
b1e0a9dc4b7ad9bcd7649a022fff3356926cdf19
$ cd bin/cli
$ cargo run -- --strategy-name mystrat ~/foo/bar
$ tree -L 1 ~/foo
foo
├── bar
└── barmystrat

A reasonable user would expect:

$ tree -L 2 ~/foo
foo
└── bar
    └── mystrat
jmcph4 commented 1 year ago

Closed by #33.