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 Execution Permissions for .NET Version on Unix Systems Before Build #94

Open
GamerVII-NET opened this issue Dec 4, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@GamerVII-NET
Copy link
Collaborator

Issue: Check Execution Permissions for .NET Version on Unix Systems Before Build

Description

While running the CreateBuilds method on Unix systems, there is no verification of execution permissions for the downloaded .NET version before starting the build process. This can potentially lead to build failures if the necessary permissions are not set.

Steps to Reproduce

  1. Execute the CreateBuilds method on a Unix system.
  2. Ensure that the downloaded .NET version does not have execution permissions.
  3. Attempt to build, and observe the failure.

Expected Behavior

The method should check and ensure that the downloaded .NET version has the necessary execution permissions before initiating the build process.

Actual Behavior

Currently, there is no check for execution permissions, which can result in build failures on Unix systems if the permissions are not manually set.

Proposed Solution

Add a check at the beginning of the method to verify if the necessary execution permissions are set for the downloaded .NET version on Unix systems. If not, adjust the permissions accordingly before proceeding with the build.

Environment

  • OS: Unix (Linux, macOS)
  • Method: CreateBuilds(string[] versions, string projectPath, DirectoryInfo launcherDirectory)
  • Affected Code Segment (Example for Unix):
  else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
  {
      command = $"{dotnetPath} publish ./src/Gml.Launcher/ -r {version} -c Release -f net8.0 -p:PublishSingleFile=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true -p:PublishReadyToRun=true";
      processStartInfo = new ProcessStartInfo("/bin/bash", "-c \"" + command + "\"")
      {
          WorkingDirectory = projectPath
      };
  }
@GamerVII-NET GamerVII-NET added the bug Something isn't working label Dec 4, 2024
@GamerVII-NET GamerVII-NET self-assigned this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant