Skip to content

Commit

Permalink
fix(bolt): clarify 1password service token warning (#541)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Feb 27, 2024
1 parent de7e4de commit eb2e7d5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/bolt/core/src/tasks/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,24 @@ pub async fn check_config_sync(ctx: &ProjectContext) {
return;
}

let (Some(local_op), Some(ns_op)) = (
ctx.config_local()._1password.as_ref(),
ctx.ns().secrets._1password.as_ref(),
) else {
// Check if 1Password service token is available
if ctx.ns().secrets._1password.is_some() && ctx.config_local()._1password.is_none() {
eprintln!();
rivet_term::status::warn(
"Warning",
format!(
r#"1Password config is not set up. Configure "ns.1password" and "local.1password" to enable config sync checks, or use `{}` to suppress this message."#,
r#"Cannot validate that config is synchronized without configuring the 1Password service token in Bolt.local.toml. See docs/libraries/bolt/CONFIG_SYNC.md for details or use `{}` to suppress this message."#,
style("BOLT_SKIP_CONFIG_SYNC=1").bold()
),
);
return;
}

let (Some(local_op), Some(ns_op)) = (
ctx.config_local()._1password.as_ref(),
ctx.ns().secrets._1password.as_ref(),
) else {
return;
};

let op_service_account_token = Some(local_op.service_account_token.clone());
Expand Down

0 comments on commit eb2e7d5

Please sign in to comment.