Skip to content

[vcpkg] format-manifest crashes when vcpkg.json file is not UTF-8 #16405

@Cheney-W

Description

@Cheney-W

Repro Steps:

  1. Save the following codes into the ports\realsense2\vcpkg.json file: (The following code is missing a comma)
    {
    "name": "realsense2",
    "version-semver": "2.42.0",
    "homepage": "https://github.com/IntelRealSense/librealsense",
    "description": "Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300)"
    "dependencies": [
    {
    "name": "libusb",
    "platform": "linux"
    }
    ]
    }
  2. Run .\vcpkg.exe format-manifest .\ports\realsense2\vcpkg.json

Expected Result:
Failed to parse ... .\ports\realsense2\vcpkg.json: ... .\ports\realsense2\vcpkg.json:6:3: error: Unexpected character; expected comma or close brace
on expression: "dependencies": [
..............................^

Actual Result:
No output after executing the command.

Comment:

  1. If the code error occurs before the "description" sentence(For example, "homapage" write one less double quote at the end), then format-manifest can detect the error.
  2. If delete the small labels in the upper right corner of Intel® and RealSense™, then format-manifest can work normally.

Metadata

Metadata

Labels

category:vcpkg-featureThe issue is a new capability of the tool that doesn’t already exist and we haven’t committedinfo:manifestsThis PR or Issue pertains to the Manifests feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions