Skip to content

Conversation

@lindexi
Copy link
Member

@lindexi lindexi commented May 29, 2024

修复打包时 sh 文件无权限

在 Windows 下本来就不能读取,因此在 Windows 下这么写是正确的。但是在 Linux 下没有读取原本文件的权限,这是不对的

@lindexi lindexi requested review from Handsome08 and walterlv May 29, 2024 09:39
@lindexi lindexi changed the title 尝试给所有的 sh 文件加权限 [DebUOS] 尝试给所有的 sh 文件加权限 May 29, 2024
@lindexi lindexi enabled auto-merge May 29, 2024 11:28
private LinuxFileMode GetFileMode(string name, /*ITaskItem metadata, */LinuxFileMode defaultMode)
{
// 后续可以尝试判断一下系统,在 Linux 下直接读取文件权限
//if (Environment.OSVersion.Platform == PlatformID.Unix)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用 RuntimeIdentifier.OSPlatform

@lindexi lindexi merged commit fae504d into master May 30, 2024
@lindexi lindexi deleted the t/lindexi/Package branch May 30, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants