Fix working directory for archiving from git. (#21166)

- The directory specified no longer matches the directory used for
    fetching.

  - This was overlooked by PR microsoft/vcpkg#19338.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Mahder Gebremedhin 2021-11-26 08:22:17 +01:00 committed by GitHub
parent 520b5c4851
commit 446f0d9a37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ function(vcpkg_from_git)
if(DEFINED arg_TAG)
message(WARNING "The TAG argument to vcpkg_from_git has been deprecated and has no effect.")
endif()
if(NOT DEFINED arg_OUT_SOURCE_PATH)
message(FATAL_ERROR "OUT_SOURCE_PATH must be specified")
@ -164,7 +164,7 @@ function(vcpkg_from_git)
vcpkg_execute_required_process(
ALLOW_IN_DOWNLOAD_MODE
COMMAND "${GIT}" archive "${rev_parse_ref}" -o "${temp_archive}"
WORKING_DIRECTORY "${DOWNLOADS}/git-tmp"
WORKING_DIRECTORY "${git_working_directory}"
LOGNAME git-archive
)
file(RENAME "${temp_archive}" "${archive}")