File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -618,12 +618,13 @@ public async Task GetSourceAsync(
618618 }
619619 }
620620
621- if ( Directory . GetParent ( targetPath ) is DirectoryInfo parent
622- && File . Exists ( Path . Combine ( parent . FullName , ".autoManagedVhd" ) )
621+ string agentWorkFolder = Environment . GetEnvironmentVariable ( "AGENT_WORKFOLDER" ) ;
622+ if ( ! string . IsNullOrEmpty ( agentWorkFolder )
623+ && File . Exists ( Path . Combine ( agentWorkFolder , ".autoManagedVhd" ) )
623624 && ! AgentKnobs . DisableAutoManagedVhdShallowOverride . GetValue ( executionContext ) . AsBoolean ( ) )
624625 {
625626 // The existing working directory comes from an AutoManagedVHD (indicated by the
626- // .autoManagedVhd marker file placed in the parent directory of the sources ).
627+ // .autoManagedVhd marker file placed in the agent work folder ).
627628 // An AutoManagedVHD always contains a full, non-shallow clone of the repository.
628629 // Some pipelines enable shallow fetch parameters (e.g., fetchDepth > 0). However,
629630 // Git cannot convert an existing full clone into a shallow one in-place.
You can’t perform that action at this time.
0 commit comments