egametang/ET · error · Exception
dir: {Path.GetFullPath(workingDirectory)}, command: {exe} {a
Error message
dir: {Path.GetFullPath(workingDirectory)}, command: {exe} {arguments} What it means
Thrown by ProcessHelper.Run when Process.Start (or its setup) fails for any reason. The framework wraps the original exception and echoes the resolved working directory, executable, and arguments so the operator can see exactly what it tried to launch. It is used to spawn dotnet and pwsh child processes during build/deploy steps.
Source
Thrown at Packages/cn.etetet.core/Scripts/Core/Share/Helper/ProcessHelper.cs:89
};
// 异步读取错误输出
process.ErrorDataReceived += (sender, args) =>
{
if (!string.IsNullOrEmpty(args.Data))
{
Log.Error(args.Data);
}
};
process.BeginOutputReadLine();
process.BeginErrorReadLine();
}
return process;
}
catch (Exception e)
{
throw new Exception($"dir: {Path.GetFullPath(workingDirectory)}, command: {exe} {arguments}", e);
}
}
}
}View on GitHub (pinned to 5cab01f7a8)
Solutions
- Verify the executable path exists on the OS; on non-Windows install dotnet/pwsh to the hardcoded paths or adjust ProcessHelper.Run to use 'which dotnet'/'which pwsh' lookups.
- Check that workingDirectory resolves to a real folder (Path.GetFullPath it before calling Run).
- Inspect the wrapped inner exception (Exception.InnerException / .Message) for the real cause such as Win32 'No such file' or permission errors.
- Ensure the process is not being launched with UseShellExecute=true while redirecting streams.
Example fix
// before
ProcessHelper.DotNet("build", "./Missing");
// after
var dir = Path.GetFullPath("./Repo");
if (!Directory.Exists(dir)) throw new InvalidOperationException($"workdir missing: {dir}");
ProcessHelper.DotNet("build", dir); Defensive patterns
Strategy: try-catch
Validate before calling
var exePath = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet";
if (!File.Exists(exePath) && !HasOnPath(exePath))
throw new FileNotFoundException($"executable not found: {exePath}");
if (!Directory.Exists(Path.GetFullPath(workingDirectory)))
throw new DirectoryNotFoundException(workingDirectory); Type guard
null
Try / catch
try { return ProcessHelper.Run(exe, args, workdir, waitExit); }
catch (Exception e) when (e.Message.StartsWith("dir:"))
{
Log.Error($"failed to launch process: {e.InnerException?.Message}");
throw;
} Prevention
- Resolve exe and workingDirectory to absolute paths and check existence before launching.
- Use platform detection to pick the correct runtime path.
- Always inspect InnerException for the real OS-level cause.
When it happens
Trigger: Calling ProcessHelper.Run/DotNet/PowerShell with an exe path that does not exist on the current OS (e.g. '/usr/local/share/dotnet/dotnet' missing on Linux), a workingDirectory that does not exist or is not accessible, or when UseShellExecute conflicts with RedirectStandardOutput.
Common situations: Wrong dotnet/pwsh install path on macOS/Linux (hardcoded /usr/local paths), building on a machine where the working directory was deleted by a clean step, permission denied on the binary, or a build pipeline running in a container without the runtime installed.
Related errors
- btenv not found key: {key} {typeof(T).FullName}
- 不能把{value.GetType()}转换为{typeof (T)}
- condition root child count error: {node.Children.Count}
- unknown condition compare op: {op}
- condition number parse error: {text}
AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13).
Data as JSON: /api/errors/30370f5c47272e68.
Report an issue: GitHub.