Summary
The user is trying to save an artifact to a local path using a command from the Earthly documentation but encounters syntax issues in bash. They attempted to wrap parentheses in quotes, but this led to an error regarding unresolved imports. They are seeking the correct command syntax to achieve their goal.
joshua.gilman
The https://docs.earthly.dev/docs/earthly-command#build-args|documentation suggests using a command like the following to save a artifact to a local path while passing args to the target:
earthly --artifact (+some-target/some-artifact --NAME=john --SPECIES=human) ./dest/path/
However, that is invalid syntax in bash, and probably most other shells. I tried wrapping the parentheses in quotes but then Earthly fails with:
Error: resolve build context for target (+release: cannot resolve non-dereferenced import ref (+some-target
What is the correct incantation here?