-
Notifications
You must be signed in to change notification settings - Fork 1
Supporting changes for envbuilder#234 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice hacking 👍
pkg/util/fs_util.go
Outdated
} | ||
|
||
var defaultIgnoreList = []IgnoreListEntry{ | ||
{ | ||
Path: filepath.Clean(config.KanikoDir), | ||
PrefixMatchOnly: false, | ||
AllowedPaths: make(map[string]struct{}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would wrap IgnoreListEntry{}
with NewIgnoreListEntry
/CreateIgnoreListEntry
, and set AllowedPaths
there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might actually be simpler to just use a []string
instead; I don't anticipate having more than 10 entries here ever. Assigning to a nil map panics, while appending to / ranging over a nil slice is fine.
Part of coder/envbuilder#234