From 96d0a10e7f22da7657e38488680d01f9bd960cbc Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 29 Aug 2022 11:06:46 -0700 Subject: [PATCH] Remove unneeded use of `chmod 777` (#17974) * Update Pester.Commands.Cmdlets.GetCommand.Tests.ps1 * Update Export-Alias.Tests.ps1 * Update test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 * Update test/powershell/Modules/Microsoft.PowerShell.Core/Pester.Commands.Cmdlets.GetCommand.Tests.ps1 * Update test/powershell/Modules/Microsoft.PowerShell.Core/Pester.Commands.Cmdlets.GetCommand.Tests.ps1 --- .../Pester.Commands.Cmdlets.GetCommand.Tests.ps1 | 4 ++-- .../Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Pester.Commands.Cmdlets.GetCommand.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Pester.Commands.Cmdlets.GetCommand.Tests.ps1 index 8cbbd2a339..6f4cf9aa77 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Pester.Commands.Cmdlets.GetCommand.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/Pester.Commands.Cmdlets.GetCommand.Tests.ps1 @@ -10,8 +10,8 @@ Describe "Tests Get-Command with relative paths and wildcards" -Tag "CI" { #$null = New-Item -ItemType File -Path (Join-Path $TestDrive WildCardCommandA.exe) -ErrorAction Ignore #$null = New-Item -ItemType File -Path (Join-Path $TestDRive WildCardCommand[B].exe) -ErrorAction Ignore if ( $IsLinux -or $IsMacOS ) { - /bin/chmod 777 "$file1" - /bin/chmod 777 "$file2" + /bin/chmod a+rw "$file1" + /bin/chmod a+rw "$file2" } $commandInfo = Get-Command Get-Date -ShowCommandInfo } diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 index e242ee7749..0b66b284ea 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 @@ -120,7 +120,7 @@ Describe "Export-Alias DRT Unit Tests" -Tags "CI" { } else { - chmod 777 $fulltestpath + chmod a+rw $fulltestpath } }