Description
TryReadResponseFile
is implemented here:
command-line-api/src/System.CommandLine/Parsing/StringExtensions.cs
Lines 349 to 395 in baf6591
It is effectively just calling ExpandResponseFile
in a try/catch, which itself will recursively call ExpandResponseFile
not in a try/catch.
What this means is that the top-most response file can succeed in resolution, but a nested response file might fail, which will in then report that the top most file was the point of failure.
Imagine you have:
WorkingDirectory
ChildDir
File1.rsp
OtherDir
File2.rsp
You then call Program @ChildDir/File1.rsp
where File1.rsp
itself contains @../OtherDir/File2.rsp
.
You will get a failure of Response file not found 'ChildDir/File1.rsp
, even though that file was found and it was ../OtherDir/File2.rsp
which could not be resolved.