chickensoft-games / GodotEnv

Manage Godot versions and addons from the command line on Windows, macOS, and Linux.

Home Page:https://www.nuget.org/packages/Chickensoft.GodotEnv/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to start a process with file path 'unzip'

titusio opened this issue · comments

System.ComponentModel.Win32Exception: Failed to start a process with file path 'unzip'. Target file or working directory doesn't exist or the provided credentials are invalid.
    System.ComponentModel.Win32Exception: An error occurred trying to start process 'unzip' with working directory '/root/.config/godotenv/godot/versions'. No such file or directory
      at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) 
      at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) 
      at CliWrap.Utils.ProcessEx.Start() in /D:\a\CliWrap\CliWrap\CliWrap\Utils\ProcessEx.cs:66
  at CliWrap.Utils.ProcessEx.Start() in /D:\a\CliWrap\CliWrap\CliWrap\Utils\ProcessEx.cs:76
  at CliWrap.Command.ExecuteAsync(CancellationToken cancellationToken) in /D:\a\CliWrap\CliWrap\CliWrap\Command.cs:508
  at Chickensoft.GodotEnv.Common.Utilities.ProcessRunner.Run(String workingDir, String exe, String[] args) in /home/runner/work/GodotEnv/GodotEnv/GodotEnv/src/common/utilities/ProcessRunner.cs:78
  at Chickensoft.GodotEnv.Common.Utilities.Shell.Run(String executable, String[] args) in /home/runner/work/GodotEnv/GodotEnv/GodotEnv/src/common/utilities/Shell.cs:27
  at Chickensoft.GodotEnv.Common.Clients.ZipClientTerminal.ExtractToDirectory(String sourceArchiveFileName, String destinationDirectoryName, IProgress`1 progress, ILog log) in /home/runner/work/GodotEnv/GodotEnv/GodotEnv/src/common/clients/ZipClientTerminal.cs:32
  at Chickensoft.GodotEnv.Features.Godot.Domain.GodotRepository.ExtractGodotInstaller(GodotCompressedArchive archive, ILog log) in /home/runner/work/GodotEnv/GodotEnv/GodotEnv/src/features/godot/domain/GodotRepository.cs:328
  at Chickensoft.GodotEnv.Features.Godot.Commands.GodotInstallCommand.ExecuteAsync(IConsole console) in /home/runner/work/GodotEnv/GodotEnv/GodotEnv/src/features/godot/commands/install/GodotInstallCommand.cs:76
  at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in /_/CliFx/CliApplication.cs:153
  at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in /_/CliFx/CliApplication.cs:193

On my Manjaro machine the download of a new godot version doesn't work.
My guess is that the /root access causes problems because its read only.

Are you running as the root user? GodotEnv uses the current user's .config directory to store its files. If it doesn't have permission to do that, it doesn't work.

Yes - it still doesn't work

I can't speak to why the OS is preventing writes to the user folder. I think it's fair for GodotEnv to assume it can write to the current user's files. I also assume the unzip process is available and the same on Manjaro as other Unix systems and is available from any shell.

The second line says

An error occurred trying to start process 'unzip' with working directory '/root/.config/godotenv/godot/versions'. No such file or directory

but it would make more sense if this would be ~/.config/... instead of root

but it would make more sense if this would be ~/.config/... instead of root

GodotEnv use's .NET's cross-platform mechanism for determining the user's current folder. If it's coming back incorrectly, that may be a .NET issue (unless the user folder for the root account is indeed just /root/. I don't think it's advisable to be logged into root for daily use in any linux distro, though).

Got it working! I thought I updated unzip but apparently my version was still outdated.