On anchor cli version 0.18.0 installed using cargo install --git https://github.com/project-serum/anchor anchor-cli --locked
When anchor build is used output is generated in $CARGO_TARGET_DIR/target/deploy/basic_0.so but the anchor deploy looks for it in the current directory.
Using anchor build -- --bpf-out-dir ./target/deploy generates the library inside $PWD/programs/basic-0/target/deploy
unset -int the CARGO_TARGET_DIR makes anchor work as expected.
Also anchor build -- --bpf-out-dir "$PWD/target/deploy" works fine.
On anchor cli version
0.18.0
installed usingcargo install --git https://github.com/project-serum/anchor anchor-cli --locked
When
anchor build
is used output is generated in$CARGO_TARGET_DIR/target/deploy/basic_0.so
but theanchor deploy
looks for it in the current directory.Using
anchor build -- --bpf-out-dir ./target/deploy
generates the library inside$PWD/programs/basic-0/target/deploy
unset -int the CARGO_TARGET_DIR makes anchor work as expected.
Also
anchor build -- --bpf-out-dir "$PWD/target/deploy"
works fine.