[wp-trac] [WordPress Trac] #62814: Hide the Node.js error message when a Docker command produces a non-zero exit code

WordPress Trac noreply at wordpress.org
Thu Jan 16 16:33:08 UTC 2025


#62814: Hide the Node.js error message when a Docker command produces a non-zero
exit code
------------------------------+--------------------
 Reporter:  johnbillion       |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  6.8
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+--------------------
 When running a command that goes via docker.js -- for example the PHP unit
 tests with `npm run test:php` or a WP-CLI command with `npm run env:cli`
 -- a rather verbose and unnecessary error message and stack trace will be
 shown by Node.js at the end of the output if the target command produces a
 non-zero exit code.

 This can safely be hidden because the stack trace only points to the
 `execSync()` call and is of no use.

 Let's hide it with a try catch block. The prior output from the target
 command remains visible.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62814>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list