Skip to content

Commit

Permalink
refactor: pass jermignore file as function parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
spatocode committed Sep 18, 2023
1 parent 78091c1 commit 2a89a70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ func (c *Config) init() error {
return nil
}

func ReadIgnoredFiles() ([]string, error) {
f, err := os.Open(jermIgnoreFile)
func ReadIgnoredFiles(file string) ([]string, error) {
f, err := os.Open(file)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion config/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (p *Python) copyNecessaryFilesToTempDir(src, dest string) error {
log.Debug("copying necessary Python files...")

ignoredFiles := defaultIgnoredGlobs
files, err := ReadIgnoredFiles()
files, err := ReadIgnoredFiles(jermIgnoreFile)
if err == nil {
ignoredFiles = append(ignoredFiles, files...)
}
Expand Down

0 comments on commit 2a89a70

Please sign in to comment.