@@ -79,6 +79,13 @@ protected function configure()
79
79
InputOption::VALUE_REQUIRED ,
80
80
'Path where any errors should be saved '
81
81
)
82
+ ->addOption (
83
+ 'error-output-format ' ,
84
+ null ,
85
+ InputOption::VALUE_REQUIRED ,
86
+ 'The output format for errors on std out ' ,
87
+ Configuration::OUTPUT_FORMAT_CONSOLE
88
+ )
82
89
->addOption (
83
90
'no-theme ' ,
84
91
null ,
@@ -137,7 +144,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
137
144
KernelFactory::createKernel ($ this ->buildConfig , $ this ->urlChecker ?? null )
138
145
);
139
146
140
- $ this ->addProgressListener ($ builder ->getConfiguration ()->getEventManager ());
147
+ $ configuration = $ builder ->getConfiguration ();
148
+ $ configuration ->setOutputFormat ($ input ->getOption ('error-output-format ' ));
149
+ $ this ->addProgressListener ($ configuration ->getEventManager ());
141
150
142
151
$ builder ->build (
143
152
$ this ->buildConfig ->getContentDir (),
@@ -159,7 +168,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
159
168
}
160
169
161
170
$ filesystem = new Filesystem ();
162
- $ filesystem ->dumpFile ($ logPath , implode ("\n" , $ buildErrors ));
171
+ $ filesystem ->dumpFile ($ logPath , implode ("\n" , array_map ( fn ( $ error ) => is_string ( $ error ) ? $ error : $ error -> asString (), $ buildErrors) ));
163
172
}
164
173
165
174
$ metas = $ builder ->getMetas ();
0 commit comments