mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[PR #1389] [MERGED] Fix Windows reload issue (/bin/sh not found) #1270
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#1270
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/0xJacky/nginx-ui/pull/1389
Author: @Alireza-Gholiei
Created: 10/12/2025
Status: ✅ Merged
Merged: 10/12/2025
Merged by: @0xJacky
Base:
dev← Head:fix/windows-exec-shell📝 Commits (1)
bc3ef78fix: support Windows in execShell by replacing /bin/sh with cmd.exe📊 Changes
1 file changed (+16 additions, -1 deletions)
View changed files
📝
internal/nginx/exec.go(+16 -1)📄 Description
This PR adds native Windows compatibility for Nginx-UI, fixing the following error when reloading Nginx on
Windows:
Updated execShell in internal/nginx/exec.go
to use cmd /C instead of /bin/sh -c when running on Windows.
This makes ReloadCmd, RestartCmd, and other Nginx commands work properly on Windows environments.
Implementation Detail
Added import "runtime" for OS detection.
Tested Environment
OS: Windows 10 / Windows Server 2019
Nginx: Windows build (nginx.exe)
Result:
Reload and Restart work correctly
UI responds successfully
No /bin/sh errors
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.