fix(windows): set GIT_CEILING_DIRECTORIES on sandbox git cwd check (#111) #186
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!186
Loading…
Reference in a new issue
No description provided.
Delete branch "cfw34683/Beanstalk:fix/windows-git-cwd-ceiling"
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?
Follow-up to #180 (#111).
Summary
In
WindowsSelfTest.cs, thegit -C . rev-parse --git-dirworking-directory check added in #180 runs inside the empty sandboxworkdirectory withoutGIT_CEILING_DIRECTORIES. Becauseworkis not a git repository, Git walks up parent folders looking for.git, leavesdata_dir(for exampleE:\BeanstalkData), attempts tostatthe drive rootE:\(which AppContainer intentionally cannot read), and fails with:Changes:
agent/Core/WindowsSelfTest.cs: addWinSelfTest.GitCeilingFor(string cwd)(pure string helper) and setGIT_CEILING_DIRECTORIESoncwdCheckso Git stops at the sandbox work folder while still verifying it can read the sandboxed working directory.agent/tests/agent_core/WindowsChecks.cs: add unit tests forWinSelfTest.GitCeilingFor().Verification
data_dir = E:\BeanstalkData):nightly-311-ccdfbdcf):dotnet build agent/App --nologoanddotnet build agent/tests/agent_core -c Release --nologo: 0 warnings, 0 errors.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.