Summary
Ubuntu container execution fails in IAM role-assignment deduplication because sort was resolved to the Linux native command instead of the PowerShell object-sorting cmdlet.
Observed Error
sort: cannot read: updatedOn: No such file or directory
Failure Point
Deduplication pipeline in [Get-AzureResourceIAMData.ps1:75], where alias usage sort/select was used in object pipeline logic.
Root Cause
Alias-style command usage is ambiguous in this execution path on Linux; command resolution hit native sort, which expects file input, not object property sorting.
Fix
Replace alias usage with explicit cmdlets:
Sort-Object updatedOn
Select-Object -First 1
Expected Result
Deduplication sorts by object property updatedOn and returns latest assignment consistently across Linux/macOS/Windows.
Linked PR:
#119
Summary
Ubuntu container execution fails in IAM role-assignment deduplication because sort was resolved to the Linux native command instead of the PowerShell object-sorting cmdlet.
Observed Error
sort: cannot read: updatedOn: No such file or directory
Failure Point
Deduplication pipeline in [Get-AzureResourceIAMData.ps1:75], where alias usage sort/select was used in object pipeline logic.
Root Cause
Alias-style command usage is ambiguous in this execution path on Linux; command resolution hit native sort, which expects file input, not object property sorting.
Fix
Replace alias usage with explicit cmdlets:
Sort-Object updatedOn
Select-Object -First 1
Expected Result
Deduplication sorts by object property updatedOn and returns latest assignment consistently across Linux/macOS/Windows.
Linked PR:
#119