fix(windows): resolve junctions behind work drive and check git cwd (#111) #180
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!180
Loading…
Reference in a new issue
No description provided.
Delete branch "cfw34683/Beanstalk:fix/111-resolve-work-drive-links"
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?
Summary
Addresses the Beanstalk side of #111 by resolving intermediate junctions/symlinks behind the work drive (
Z:) and verifyinggit -C .working-directory readability insandbox-check.Cause
When
home.Data(or any intermediate directory above it) is behind a Windows junction or symlink,Python(Failed to find real location of Z:\...) and MSYS2git(Unable to read current working directory: Permission denied) resolveZ:\...to the final target path. Previously,WindowsSandboxonly grantedWinAccess.Listalong the lexicalWinDrive.Above(home.Data)path, andGitInside()insandbox-checkonly rangit --version(which does not exercisegetcwd()).Changes
agent/Core/WindowsPlan.cs,agent/Core/WindowsNative.cs: AddedWinDrive.ResolveRealPathandWinWorkDrive.RealPathto resolve any intermediate reparse points/junctions alonghome.Data(plusWinDrive.SafeAbovesoTooWide()folders are skipped).agent/Core/WindowsSandbox.cs: GrantsWinAccess.ListalongSafeAbovefor bothhome.DataandWinWorkDrive.RealPath(home.Data).agent/Core/WindowsSelfTest.cs: ExtendsGitInside()to rungit -C . rev-parse --git-dirand fail with a clear diagnostic ifUnable to read current working directory/Permission deniedoccurs.agent/tests/agent_core/WindowsChecks.cs: Added unit test forWinDrive.ResolveRealPath.Verification
dotnet build agent\tests\agent_core\AgentCoreTests.csproj --configuration Releasesucceeded (0 Warning(s), 0 Error(s)).