Skip to content

Commit

Permalink
Fix NuGet cache failures with custom paths (#761)
Browse files Browse the repository at this point in the history
The second strip("global-packages: ") call is intended to remove the characters in the set "global-packages: " from both ends of the string. This set includes each individual character: 'g', 'l', 'o', 'b', 'a', 'l', '-', 'p', 'a', 'c', 'k', 'a', 'g', 'e', 's', ':', and ' ' (space). It does not treat "global-packages: " as a single substring to remove.
  • Loading branch information
NishanthSanjeevi authored Feb 25, 2024
1 parent d864b21 commit bc453d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion edk2toolext/environment/extdeptypes/nuget_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _fetch_from_nuget_cache(self, package_name: str) -> bool:
# Seek to the beginning of the output buffer and capture the output.
return_buffer.seek(0)
return_string = return_buffer.read()
self.nuget_cache_path = return_string.strip().strip("global-packages: ")
self.nuget_cache_path = return_string.strip().replace("global-packages: ", "")

if self.nuget_cache_path is None:
logging.info("Nuget was unable to provide global packages cache location.")
Expand Down

0 comments on commit bc453d1

Please sign in to comment.