Open drts01 opened 1 month ago
Unintuitive behavior, where environment variables supersede the CLI flags. Specifically, APOLLO_KEY supersedes --profile.
APOLLO_KEY
--profile
rover
rover config whoami --profile PROFILE
The profile flag should be used, not the environment variable APOLLO_KEY.
❯ rover --skip-update-check config whoami --profile PROFILE --format json --log debug | jq . DEBUG rover::utils::env: $APOLLO_KEY = serv**************************************************fpGQ at src/utils/env.rs:36 ... DEBUG houston::profile: using API key serv**************************************************fpGQ at crates/houston/src/profile/mod.rs:88 Checking identity of your API key against the registry. DEBUG rover_client::blocking::studio_client: self.version: "0.26.0" at crates/rover-client/src/blocking/studio_client.rs:87 ... DEBUG houston::profile: using API key serv**************************************************fpGQ at crates/houston/src/profile/mod.rs:88 { "data": { "api_key": "serv**************************************************fpGQ", "graph_id": "Supergraph", "graph_title": "Supergraph", "key_type": "Graph", "origin": "$APOLLO_KEY", "success": true, "user_id": null }, "error": null, "json_version": "1" }
❯ rover info Rover Info: Version: 0.26.0 Install Location: /Users/<REDACTED>/.local/bin/rover OS: Mac OS 14.6.1 [64-bit] Shell: /bin/zsh
related proposal https://github.com/apollographql/rover/issues/2047
Description
Unintuitive behavior, where environment variables supersede the CLI flags. Specifically,
APOLLO_KEY
supersedes--profile
.Steps to reproduce
rover
.APOLLO_KEY
.rover config whoami --profile PROFILE
Expected result
The profile flag should be used, not the environment variable
APOLLO_KEY
.Actual result
Environment