Skip to content

Commit

Permalink
Set permissions for include folder on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
michalchecinski committed Apr 16, 2024
1 parent 24e6ddb commit 6074481
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,20 @@ jobs:
name: libbitwarden_c_files-${{ matrix.settings.target }}
path: languages/cpp/include

- name: List includes
- name: Set permissions to include folder
if: runner.os == 'Windows'
shell: pwsh
run: |
ls languages/cpp/include
Get-Acl languages/cpp/include/* | Format-List
$path = "./languages/cpp/include"
$name = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
$acl = Get-Acl languages/cpp/include
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($name,"FullControl","Allow")
$acl.SetAccessRule($accessRule)
$acl | Set-Acl languages/cpp/include
Get-ChildItem -Path "$path" -Recurse -Force | Set-Acl -aclObject $acl -Verbose
Get-Acl languages/cpp/include/* | Format-List
- name: Build unix
Expand Down

0 comments on commit 6074481

Please sign in to comment.