ancient-iron-36296
01/02/2023, 2:30 PMcargo metadata in a subcommand in a build process, but I'm getting a strange error which looks to me like maybe an entrypoint is different or something 🤔 is what I'm trying to do even possible? My build script is at https://github.com/sd2k/recipes/blob/embed-web/crates/recipe-web/build.rs.
2023-01-02T14:17:05.255158427Z INFO --- stderr
2023-01-02T14:17:05.262283933Z INFO Error: error from HTML pipeline
2023-01-02T14:17:05.268691814Z INFO
2023-01-02T14:17:05.276181519Z INFO Caused by:
2023-01-02T14:17:05.282724839Z INFO 0: error getting cargo metadata
2023-01-02T14:17:05.288347907Z INFO 1: `cargo metadata` exited with an error: error: Found argument 'metadata' which wasn't expected, or isn't valid in this context
2023-01-02T14:17:05.294856801Z INFO
2023-01-02T14:17:05.301009994Z INFO USAGE:
2023-01-02T14:17:05.306583215Z INFO service [OPTIONS] --provisioner-address <PROVISIONER_ADDRESS> --proxy-fqdn <PROXY_FQDN> --project <PROJECT> --admin-secret <ADMIN_SECRET>
2023-01-02T14:17:05.312050043Z INFO
2023-01-02T14:17:05.318334428Z INFO For more information try --help
[0]: I'm actually running trunk programmatically to build some WASM assets so I can embed them, but trunk calls cargo metadata [here](https://github.com/thedodd/trunk/blob/master/src/config/manifest.rs#L23)ancient-iron-36296
01/02/2023, 2:31 PMwasm32-unknown-unknown target installed so this idea might also fail there, but I'm still interested 😄stocky-kangaroo-53672
01/03/2023, 6:56 AMbuild.rs would call it though 🤷♂️
service [OPTIONS] --provisioner-address <PROVISIONER_ADDRESS> --proxy-fqdn <PROXY_FQDN> --project <PROJECT> --admin-secret <ADMIN_SECRET>ancient-iron-36296
01/03/2023, 8:39 AMcargo_metadata crate just calls (effectively) std::process::Command::new(std::env::var("CARGO").unwrap_or_else(|| "cargo".to_string())).arg("metadata") so unless CARGO is set I have no idea what's going on 😅stocky-kangaroo-53672
01/03/2023, 8:56 AMCARGO is not set inside the project containers 😅