Skip to content

Commit 27bc80e

Browse files
committed
Merge branch 'vcastellm/load-env-from-path' into 3.3.x-agglayer
2 parents 2db898f + a62ff26 commit 27bc80e

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/utils/bin/fetch_fault_dispute_game_config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ async fn main() -> Result<()> {
214214
if let Some(root) = find_project_root() {
215215
dotenv::from_path(root.join(args.env_file)).ok();
216216
} else {
217-
eprintln!("Warning: Could not find project root. {} file not loaded.", args.env_file);
217+
// Try to load the env file in case it's present
218+
if dotenv::from_path(args.env_file.clone()).is_err() {
219+
eprintln!("Warning: Could not find project root. {} file not loaded.", args.env_file);
220+
}
218221
}
219222

220223
update_fdg_config().await?;

scripts/utils/bin/fetch_l2oo_config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ async fn main() -> Result<()> {
157157
if let Some(root) = find_project_root() {
158158
dotenv::from_path(root.join(args.env_file)).ok();
159159
} else {
160-
eprintln!("Warning: Could not find project root. {} file not loaded.", args.env_file);
160+
// Try to load the env file in case it's present
161+
if dotenv::from_path(args.env_file.clone()).is_err() {
162+
eprintln!("Warning: Could not find project root. {} file not loaded.", args.env_file);
163+
}
161164
}
162165

163166
update_l2oo_config().await?;

0 commit comments

Comments
 (0)