Skip to content

Commit

Permalink
[cpackget] MacOS tests failing #150 (#177)
Browse files Browse the repository at this point in the history
Clearing RO flag before renaming of files / folders. Required on MAC to run on RO-directories
  • Loading branch information
thorstendb-ARM authored Jun 5, 2023
1 parent 73a85fa commit a5d4242
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ jobs:
strategy:
matrix:
# Tests on Mac are currently broken
goos: [windows, linux] # , darwin]
goos: [windows, linux, darwin]
include:
- goos: windows
runs-on: windows-latest
- goos: linux
runs-on: ubuntu-latest
# - goos: darwin
# runs-on: macos-latest
- goos: darwin
runs-on: macos-latest

name: "${{ matrix.goos }} | amd64"
runs-on: ${{ matrix.runs-on }}
Expand Down
2 changes: 2 additions & 0 deletions cmd/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ func MoveFile(source, destination string) error {
return errs.ErrCopyingEqualPaths
}

UnsetReadOnly(source)

err := os.Rename(source, destination)
if err != nil {
log.Errorf("Can't move file \"%s\" to \"%s\": %s", source, destination, err)
Expand Down

0 comments on commit a5d4242

Please sign in to comment.