Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Extend PKG_CONFIG_PATH rather than overwriting it

未關閉
#1,243 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
20/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
github-actions, typescript
領域
ci-cd, devops

研究方向

該 issue 將 setup-python 對 PKG_CONFIG_PATH 的處理確定為切入點;檢查 action 的環境與路徑寫入程式碼,以及任何相關測試。在已有 PKG_CONFIG_PATH 的情況下驗證行為,並確認先前的目錄與產生的目錄都仍然可用。相關工作已經由 PR #1242 表示。

由索引模型根據 Issue 內容生成。

描述

feature request

Description:

As of now, the setup-python action overwrites the PKG_CONFIG_PATH variable during its execution, which can lead to errors if this variable has already been set to a specific value (which is then no longer available). PKG_CONFIG_PATH works as the normal PATH does (from the man page of pkg-config)

PKG_CONFIG_PATH
  A colon-separated list of high-priority directories where pc(5) files are looked up.

It would therefore be a good idea to instead extend PKG_CONFIG_PATH by adding the new directory to the existing value if one is present in the environment. This will make both existing and new pc files available (We would not want to overwrite PATH either, would we?)

Justification:

I realized this issue after debugging session of a CI pipeline which had a global

env:
  PKG_CONFIG_PATH: '/special/path'

attached to a given workflow. After installing python using setup-python the python dependencies (which included a native library with a pc file) could not be installed any more, since that variable had been overwritten. This is a rather insidious error which is really hard to find.

Are you willing to submit a PR?

Working on a PR.

主要語言
TypeScript
星號
2.2k
分支
739
平均合併
6 天 18 小時
30 天內合併 PR
1

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

actions/setup-python 的其他 Issue

查看 actions/setup-python 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。