Skip to content

Commit

Permalink
fix --ignore bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoyamachi committed Jun 16, 2019
1 parent 3f5825b commit 65a3293
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,18 @@ func Run(c *cli.Context) (err error) {
}

func getIgnoreCheckpointMap(ignoreRules []string) {
ignoreCheckpointMap = map[string]struct{}{}
for _, rule := range ignoreRules {
ignoreCheckpointMap[rule] = struct{}{}
}

f, err := os.Open(dockleIgnore)
if err != nil {
log.Logger.Debug("There is no .dockleignore file")
// dockle must work even if there isn't ignore file
return
}

ignoreCheckpointMap = map[string]struct{}{}
for _, rule := range ignoreRules {
ignoreCheckpointMap[rule] = struct{}{}
}

scanner := bufio.NewScanner(f)
for scanner.Scan() {
line := scanner.Text()
Expand Down

0 comments on commit 65a3293

Please sign in to comment.