@@ -359,14 +359,14 @@ impl<'src> Recipe<'src> {
359359 cmd. stdout ( Stdio :: null ( ) ) ;
360360 }
361361
362+ cmd. export ( settings, context. dotenv , scope, & context. module . unexports ) ;
363+
362364 for attribute in & self . attributes {
363365 if let Attribute :: Env ( key, value) = attribute {
364366 cmd. env ( & key. cooked , & value. cooked ) ;
365367 }
366368 }
367369
368- cmd. export ( settings, context. dotenv , scope, & context. module . unexports ) ;
369-
370370 let ( result, caught) = cmd. status_guard ( ) ;
371371
372372 match result {
@@ -524,19 +524,19 @@ impl<'src> Recipe<'src> {
524524 command. args ( positional) ;
525525 }
526526
527- for attribute in & self . attributes {
528- if let Attribute :: Env ( key, value) = attribute {
529- command. env ( & key. cooked , & value. cooked ) ;
530- }
531- }
532-
533527 command. export (
534528 & context. module . settings ,
535529 context. dotenv ,
536530 scope,
537531 & context. module . unexports ,
538532 ) ;
539533
534+ for attribute in & self . attributes {
535+ if let Attribute :: Env ( key, value) = attribute {
536+ command. env ( & key. cooked , & value. cooked ) ;
537+ }
538+ }
539+
540540 // run it!
541541 let ( result, caught) = command. status_guard ( ) ;
542542
0 commit comments