Skip to content

Commit 92a9622

Browse files
committed
chore: Move glob pattern into const
1 parent 4b353da commit 92a9622

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/boil/src/build/bakefile.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ use crate::{
2828
utils::{format_image_manifest_uri, format_image_repository_uri},
2929
};
3030

31+
/// This glob pattern matches all (deeply nested) image configs.
32+
pub const ALL_CONFIGS_GLOB_PATTERN: &str = "**/boil-config.toml";
3133
pub const COMMON_TARGET_NAME: &str = "common--target";
3234
pub const ENTRY_TARGET_NAME_PREFIX: &str = "entry--";
3335

@@ -106,7 +108,7 @@ impl IntoIterator for Targets {
106108

107109
impl Targets {
108110
pub fn all(options: TargetsOptions) -> Result<Self, TargetsError> {
109-
let image_config_paths = glob("./**/boil-config.toml")
111+
let image_config_paths = glob(ALL_CONFIGS_GLOB_PATTERN)
110112
.expect("glob pattern must be valid")
111113
.filter_map(Result::ok);
112114

0 commit comments

Comments
 (0)