Skip to content

Anchor deploy fails when CARGO_TARGET_DIR is set. #958

@uttarayan21

Description

@uttarayan21

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions