Skip to content

Commit

Permalink
Add permissions on windows to delete our temp files
Browse files Browse the repository at this point in the history
  • Loading branch information
gangelo committed May 21, 2024
1 parent 4f483cb commit 1dda0dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,16 @@ jobs:
- name: Install dependencies
run: bundle install

- name: Grant delete permissions on Windows
#if: matrix.os == 'windows-latest'
#run: icacls D:\a\_temp /grant Everyone:F /T
# run: |
# $path = "D:/a/_temp"
# $acl = Get-Acl $path
# $permission = "Everyone", "FullControl", "ContainerInherit, ObjectInherit", "None", "Allow"
# $accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission
# $acl.SetAccessRule($accessRule)
# Set-Acl $path $acl

- name: Run tests
run: bundle exec rake
3 changes: 2 additions & 1 deletion spec/dsu/crud/json_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def to_h
end

before do
File.delete(temp_file)
FileUtils.chmod(0o644, temp_file.path)
File.delete(temp_file.path)
end

let(:input_file) { 'spec/fixtures/files/json_file.json' }
Expand Down

0 comments on commit 1dda0dd

Please sign in to comment.