File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -23,23 +23,39 @@ public function definition()
2323 'assigned_to_id ' => User::factory (),
2424 ];
2525 }
26+ protected static bool $ skipActionLog = false ;
27+
28+ public function withoutActionLog (): static
29+ {
30+ // turn off for this create() call
31+ static ::$ skipActionLog = true ;
32+
33+ // ensure it turns back on AFTER creating
34+ return $ this ->afterCreating (function () {
35+ static ::$ skipActionLog = false ;
36+ });
37+ }
2638
2739 public function configure (): static
2840 {
2941 return $ this ->afterCreating (function (CheckoutAcceptance $ acceptance ) {
42+ if (static ::$ skipActionLog ) {
43+ return ; // short-circuit
44+ }
3045 if ($ acceptance ->checkoutable instanceof Asset) {
3146 $ this ->createdAssociatedActionLogEntry ($ acceptance );
3247 }
3348
3449 if ($ acceptance ->checkoutable instanceof Asset && $ acceptance ->assignedTo instanceof User) {
3550 $ acceptance ->checkoutable ->update ([
36- 'assigned_to ' => $ acceptance ->assigned_to_id ,
37- 'assigned_type ' => get_class ($ acceptance ->assignedTo ),
51+ 'assigned_to ' => $ acceptance ->assigned_to_id ,
52+ 'assigned_type ' => get_class ($ acceptance ->assignedTo ),
3853 ]);
3954 }
4055 });
4156 }
4257
58+
4359 public function forAccessory ()
4460 {
4561 return $ this ->state ([
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ function url_get_contents ($Url) {
6262 break ;
6363 case '--no-interactive ' :
6464 $ no_interactive = true ;
65+ putenv ("COMPOSER_NO_INTERACTION=1 " ); //put composer in non-interactive mode aswell
6566 break ;
6667 default : // for legacy support from before we started using --branch
6768 $ branch = $ argv [$ arg ];
@@ -443,7 +444,8 @@ function url_get_contents ($Url) {
443444 echo $ git_fetch ;
444445 echo '-- ' .$ git_stash ;
445446 echo '-- ' .$ git_checkout ;
446- echo '-- ' .$ git_pull ."\n" ;
447+ echo '-- ' .$ git_pull ;
448+ echo "\n" ;
447449} else {
448450 echo "Git is NOT installed. You can still use this upgrade script to run common \n" ;
449451 echo "migration commands, but you will have to manually download the updated files. \n\n" ;
You can’t perform that action at this time.
0 commit comments