Repository navigation
test(childproc): pin native-launcher shebang resolution without shell root (Refs #1848) - #1851
Merged
Merged
Conversation
caomengxuan666
force-pushed
the
fix/1848-env-script-shebang-createprocess
branch
from
November 22, 2026 16:00
845f07b to
3c690b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a regression test in
tests/unit/childproc/childproc_unit_test.cpp(env_shebang_script_with_posix_interpreter_resolves_via_path_without_shell_root) verifying that native-launcherenvinvocations on#!/usr/bin/env ...scripts resolve viaPATHeven withNIU_ROOT/WINUXSH_ROOT/RUBASH_ROOT/__RUBASH_SHELL_ROOTunset.Root-cause finding for #1848:
env: failed to run command '.git/hooks/pre-commit': Permission denied, rc=126) reproduces on WinuxCmd 1.2.1 (a86b562a, which predates the [bug] env 启动 #! 脚本失败(Permission denied/126):未接入 execvp 形 childproc 解析,#!/usr/bin/env 的 git hook 依赖它(niubash#1002) #1623/fix(env): launch #! scripts through the shared childproc resolver (Refs #1623) #1628 shebang resolver35f48641/7a0873c7).main(WinuxCmd 1.2.2,f0d18f5d),childproc.cppmalready resolves#!scripts from native launchers cleanly; upgrading the stagedwinuxcmdbinary to >= 1.2.2 resolves env 被原生启动器以脚本文件为操作数调用时 CreateProcess 失败(git hook 场景,niubash#1002 残面) #1848.Verification:
winuxcmd-tests.exe --gtest_filter="childproc.*:env.*": 83 passed, 0 failedcargo test: all passed