WordPress / WordPress/wordpress-playground

PHP: Don't catch all the errors in Dockerfile, catch only specific exit codes

Open
#355 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Feature] PHP.wasm [Type] Developer Experience [Type] Enhancement
Dominant language
JavaScript
Stars
2k
Forks
462
Avg merge
18h 44m
Merged PRs (30d)
33

Description

This line tolerates all the errors:

https://github.com/WordPress/wordpress-playground/blob/acb1cbe00794ebb55ad4246d078b7b9fd277da97/packages/php-wasm/compile/Dockerfile#LL98C50-L98C50

Let's check the status code and only accept a specific one:

|| echo $?
#!/bin/env bash

shasum -c ''
echo $?
2

if [[ 2 -eq $? ]]; then
    blahblah
fi;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect packages/php-wasm/compile/Dockerfile at the linked line and identify the command whose failure is currently ignored. Run the relevant Docker build, then verify that the intended exit code is accepted while other failures cause the build to fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell, wasm
Domain
build-system, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.