Fix: ensure /usr/local/bin exists before installing binary #109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "stahiga/fix-missing-bin-dir"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In certain environments (e.g., ubuntu desktop minimal),
/usr/local/bindoes not exist.In such cases,installing fails to place the xray binary while not halting the script execution.
This PR adds a check to create the directory before installing the binary.
某些环境下
/usr/local/bin没有被预安装。这时脚本在执行安装xray binary逻辑时,会失败但不报错。
现在在install逻辑前增加了目录检查,如果目录不存在则创建。
Alpine不可能有这种问题,不应该检查
这个修改是因为一个新环境安装(Ubuntu desktop minimal)中遇到的问题,
表明该目录在某些发行版中有不存在的可能,所以在安装逻辑中增加了目录检查。
Alpine 脚本只是保持一致性地采用了相同逻辑,已在 Alpine 镜像上验证可以正常运行。
minimal的Ubuntu docker映像78.1MB都有这个文件夹 很难想象desktop minimal能没有
我搜了一下网上好像 类似的报错极度稀少且基本来自macos(显然不属于这个脚本的支持范围)
你确定没有这个文件夹是你使用的发行版预期的?你可以提供信息吗
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.