You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when a postStartCommand fails, the log doesn't contain any information about why the command failed, making it hell to debug. Would be nice if this could be fixed.
Example:
2023-03-28 16:01:47.780Z: echo -n 'Waiting for MySQL to come online'; bash -c 'until [[ `docker ps --format="{{ .Names }}" 2>/dev/null | grep mysql` ]]; do echo -n .; sleep 0.5; done; export MYSQL_CONTAINER=`docker ps --format="{{ .Names }}" | grep mysql`;
2023-03-28 16:02:20.762Z: postStartCommand failed with exit code 1. Skipping any further user-provided commands.
2023-03-28 16:02:20.775Z: Error: Command failed: /bin/sh -c echo -n 'Waiting for MySQL to come online'; bash -c 'until [[ `docker ps --format="{{ .Names }}" 2>/dev/null | grep mysql` ]]; do echo -n .; sleep 0.5; done; export MYSQL_CONTAINER=`docker ps --format="{{ .Names }}" | grep mysql`;
2023-03-28 16:02:20.780Z: at wN (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1708:130)
2023-03-28 16:02:20.844Z: at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-03-28 16:02:20.850Z: at async Tg (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1700:4370)
2023-03-28 16:02:20.870Z: at async DN (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1700:3895)
2023-03-28 16:02:20.875Z: at async Pg (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1700:3097)
2023-03-28 16:02:20.880Z: devcontainer process exited with exit code 1
2023-03-28 16:02:20.886Z: at async Ka (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1700:2393)
2023-03-28 16:02:20.894Z: at async uie (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1869:3362)
2023-03-28 16:02:20.911Z: at async kie (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1936:2807)
2023-03-28 16:02:20.919Z: at async zf (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1936:3759)
2023-03-28 16:02:20.925Z: at async uoe (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2060:17560)
2023-03-28 16:02:20.942Z: {"outcome":"error","message":"Command failed: /bin/sh -c echo -n 'Waiting for MySQL to come online'; bash -c 'until [[ `docker ps --format=\"{{ .Names }}\" 2>/dev/null | grep mysql` ]]; do echo -n .; sleep 0.5; done; export MYSQL_CONTAINER=`docker ps --format=\"{{ .Names }}\" | grep mysql`;","description":"The postStartCommand in the devcontainer.json failed.","containerId":"9715fe9bed2786835d01b2eddbdb40a555a8c1e8679c6219add72515812be1a2"}
Similarly, when the command works as intended, it is shown in the terminal of my Codespace, but the output is not shown there, even though it ends up in the creationlog after the command finishes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently, when a
postStartCommand
fails, the log doesn't contain any information about why the command failed, making it hell to debug. Would be nice if this could be fixed.Example:
Similarly, when the command works as intended, it is shown in the terminal of my Codespace, but the output is not shown there, even though it ends up in the
creationlog
after the command finishes.Beta Was this translation helpful? Give feedback.
All reactions