Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check .csh and .pl for absolute paths #1426

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ endif()
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/vcpkg-policy-absolute-paths.h" "${PROBLEM_TEXT}")

file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
file(WRITE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/port-config.sh" "${PROBLEM_TEXT}")

if("policy" IN_LIST FEATURES)
set(VCPKG_POLICY_SKIP_ABSOLUTE_PATHS_CHECK enabled)
endif()
1 change: 1 addition & 0 deletions azure-pipelines/end-to-end-tests-dir/post-build-checks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ note: Absolute paths were found in the following files
$($packagesRoot)$($NativeSlash)vcpkg-policy-absolute-paths_$($Triplet): note: the files are relative to `${CURRENT_PACKAGES_DIR} here
note: include/vcpkg-policy-absolute-paths.h
note: share/pkgconfig/vcpkg-policy-absolute-paths.pc
note: tools/vcpkg-policy-absolute-paths/bin/port-config.sh
"@

foreach ($bad_dir in @('build-dir', 'downloads', 'installed-root', 'package-dir')) {
Expand Down
2 changes: 1 addition & 1 deletion src/vcpkg/postbuildlint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ namespace vcpkg
}

if (extension == ".py" || extension == ".sh" || extension == ".cmake" || extension == ".pc" ||
extension == ".conf")
extension == ".conf" || extension == ".csh" || extension == ".pl")
{
const auto contents = fs.read_contents(file, IgnoreErrors{});
return Strings::contains_any_ignoring_hash_comments(contents, searcher_paths);
Expand Down
Loading