Skip to content

vcpkg env --tools command broken #19552

@lukka

Description

@lukka

Describe the bug
vcpkg env command is broken when using --tools flag.

Environment

  • OS: Windows

To Reproduce
Steps to reproduce the behavior:

  1. Get vcpkg sources at commit id eb9cb29, and bootstrap.
  2. Launch the following:
.\vcpkg.exe env --bin --tools --python set
get_directories_non_recursive(D:\repos\vcpkg\installed\x86-windows\tools): The system cannot find the path specified.

It repro when the --tools is being passed.

Expected behavior
It should execute properly the provided command, i.e. set

Additional context
The error is happening since commit id dee2b65c7c565697d38b74f26534e62d1f502a89, where the call to get_directories_non_recursive were introduced.

Note that it looks that API triggers the error when a non existing directory is provided. If such direcotry reported in the error is created (e.g., mkdir installed\x86-windows\tools), then invoking vcpkg env --tools set just works.

@ras0219-msft @BillyONeal FYI

Metadata

Metadata

Assignees

Labels

requires:tool-releaseAn issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions