# Parse output from older version of the devcontainer CLI by looking for a JSON object in plaintext \(\#47403\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c63a0bc35828241fc4ebe0966de8085a72936993)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c63a0bc35828241fc4ebe0966de8085a72936993

Requested commit: c63a0bc35828241fc4ebe0966de8085a72936993

Commit: c63a0bc35828241fc4ebe0966de8085a72936993

Tree: e72be634df2cf61d256ed0573da20abdf4e157f4

Author: KyleBarton

Committer: GitHub

## Message

```
Parse output from older version of the devcontainer CLI by looking for a JSON object in plaintext (#47403)

Closes #46852

The devcontainer CLI which ships with VS Code can be added to the user's
`PATH` with the VS Code command `Dev Containers: Install devcontainer
CLI`. This version of the CLI is older than what Zed was developed with,
and as a result, it doesn't separate its json-formatted output and its
plaintext metadata into distinct output streams. This broke parsing in
the CLI adapter in Zed. This fix accounts for that, and if parsing
fails, attempts to find a relevant JSON object in plaintext and tries to
parse that.

Tested with VSCode's version of the devcontainer CLI (`0.80.1`) as well
as the up-to-date version (`0.81.1`)

Release Notes:

- Improved parsing of devcontainer CLI output when using earlier
versions
```

## Parents

- [d6bd3661e2ddbc0b38e4acf04bd29682d2c4feba](https://git.cafe/gitcafe/zed/commit/d6bd3661e2ddbc0b38e4acf04bd29682d2c4feba?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c63a0bc35828241fc4ebe0966de8085a72936993?format=markdown)
