@@ -452,9 +452,28 @@ fn compare_environments(env: PythonEnvironment, environment: PythonEnvironment,
452
452
. collect :: < Vec < PathBuf > > ( ) ,
453
453
) ;
454
454
455
- // Ignore architecture, as we never know what this is except when spawning it.
455
+ // if we know the arch, then verify it
456
+ if environment. arch . as_ref ( ) . is_some ( ) && env. arch . as_ref ( ) . is_some ( ) {
457
+ if env. arch . as_ref ( ) != environment. arch . as_ref ( ) {
458
+ error ! (
459
+ "Arch mismatch when using {} for {:?} and {:?}" ,
460
+ method, environment, env
461
+ ) ;
462
+ }
463
+ }
456
464
env. arch = environment. clone ( ) . arch ;
457
465
466
+ // if we know the prefix, then verify it
467
+ if environment. prefix . as_ref ( ) . is_some ( ) && env. prefix . as_ref ( ) . is_some ( ) {
468
+ if env. prefix . as_ref ( ) != environment. prefix . as_ref ( ) {
469
+ error ! (
470
+ "Prefirx mismatch when using {} for {:?} and {:?}" ,
471
+ method, environment, env
472
+ ) ;
473
+ }
474
+ }
475
+ env. prefix = environment. clone ( ) . prefix ;
476
+
458
477
// assert_eq!(
459
478
// env, environment,
460
479
// "Environment mismatch when using {} for {:?}",
@@ -513,7 +532,7 @@ fn verify_we_can_get_same_env_info_using_resolve_with_exe(
513
532
) ;
514
533
return ;
515
534
}
516
- compare_environments ( env. resolved . unwrap ( ) , environment , "resolve" ) ;
535
+ compare_environments ( environment , env. resolved . unwrap ( ) , "resolve" ) ;
517
536
}
518
537
519
538
#[ cfg( unix) ]
0 commit comments