Skip to content

vcpkg fetch sometimes outputs more than the path to the executable #48787

@timoschwarzer

Description

@timoschwarzer

Describe the bug
Using e.g. vcpkg fetch nuget as outlined in the documentation here does not always work.

In some cases, vcpkg outputs additional text to stdout, such as

A suitable version of nuget was not found (required v7.0.1).
Downloading https://dist.nuget.org/win-x86-commandline/v7.0.1/nuget.exe -> ef1d4af5-nuget.exe
Successfully downloaded ef1d4af5-nuget.exe
C:\Users\Timo\.vcpkg-clion\vcpkg\downloads\tools\nuget-7.0.1-windows\nuget.exe

Running with --x-stderr-status reduces the output to stdout, but still prints this to stdout:

Downloading https://dist.nuget.org/win-x86-commandline/v7.0.1/nuget.exe -> ef1d4af5-nuget.exe
Successfully downloaded ef1d4af5-nuget.exe
C:\Users\Timo\.vcpkg-clion\vcpkg\downloads\tools\nuget-7.0.1-windows\nuget.exe

Environment

  • OS: Windows
  • Compiler: N/A

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg.exe fetch nuget without having nuget installed
  2. Output to stdout contains multiple status messages

Expected behavior
Output to stdout should only be the path to the downloaded binary, at least when invoked with --x-stderr-status, but it contains more text making it unusable as outlined in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions