Skip to content

Commit

Permalink
[Issue #220] - dcRUSTy - Fix bug that crashed test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dcRUSTy committed Aug 13, 2020
1 parent a917db6 commit 76c87fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions directory_hook.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"io/ioutil"
"talisman/gitrepo"
"talisman/utility"

log "github.com/Sirupsen/logrus"

Expand Down Expand Up @@ -35,5 +35,5 @@ func (p *DirectoryHook) GetFilesFromDirectory(globPattern string) []gitrepo.Addi

func ReadFile(filepath string) ([]byte, error) {
log.Debugf("reading file %s", filepath)
return ioutil.ReadFile(filepath)
return utility.SafeReadFile(filepath)
}
2 changes: 1 addition & 1 deletion git_testing/git_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func Init(gitRoot string) *GitTesting {
os.MkdirAll(gitRoot, 0777)
testingRepo := &GitTesting{gitRoot}
testingRepo.ExecCommand("git", "init", ".")
gitConfigFileObject, _ := ioutil.TempFile("/tmp", "gitConfigForTalismanTests")
gitConfigFileObject, _ := ioutil.TempFile(os.TempDir(), "gitConfigForTalismanTests")
gitConfigFile = gitConfigFileObject.Name()
testingRepo.CreateFileWithContents(gitConfigFile, `[user]
email = talisman-test-user@example.com
Expand Down

0 comments on commit 76c87fa

Please sign in to comment.