Skip to content

Commit 5e4f035

Browse files
committed
Re-adding LazyConfig::is_init for use in cwd changing code
1 parent a40a64b commit 5e4f035

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/bin/cargo/cli.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,13 @@ impl LazyConfig {
497497
Self { config: None }
498498
}
499499

500+
/// Check whether the config is loaded
501+
///
502+
/// This is useful for asserts in case the environment needs to be setup before loading
503+
pub fn is_init(&self) -> bool {
504+
self.config.is_some()
505+
}
506+
500507
/// Get the config, loading it if needed
501508
///
502509
/// On error, the process is terminated

0 commit comments

Comments
 (0)