Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit ad38e4c

Browse files
authored
Use .NET7 UnixFileMode (#14)
1 parent 6574eed commit ad38e4c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

ClientUpdater/Updater.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,15 +1391,8 @@ private static async ValueTask<bool> DownloadFileAsync(UpdaterFileInfo fileInfo)
13911391
{
13921392
Logger.Log($"Updater: File {downloadFile.Name} is a script, adding execute permission.");
13931393

1394-
string escapedArgs = $"chmod +x {downloadFile.FullName}".Replace("\"", "\\\"");
1395-
using var chmodProcess = Process.Start(new ProcessStartInfo
1396-
{
1397-
FileName = "/bin/sh",
1398-
Arguments = $"-c \"{escapedArgs}\"",
1399-
CreateNoWindow = true
1400-
});
1394+
downloadFile.UnixFileMode |= UnixFileMode.UserExecute;
14011395

1402-
await chmodProcess.WaitForExitAsync().ConfigureAwait(false);
14031396
Logger.Log($"Updater: File {downloadFile.Name} execute permission added.");
14041397
}
14051398
}

0 commit comments

Comments
 (0)