mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
Merge pull request #1227 from TimeIncOSS/ignore-hidden
config: ignore hidden files when autoloading *.tf per Unix conventions
This commit is contained in:
commit
56b25399b4
@ -187,7 +187,7 @@ func dirFiles(dir string) ([]string, []string, error) {
|
||||
// provided file name is a temporary file for the following editors:
|
||||
// emacs or vim.
|
||||
func isTemporaryFile(name string) bool {
|
||||
return strings.HasSuffix(name, "~") || // vim
|
||||
strings.HasPrefix(name, ".#") || // emacs
|
||||
return strings.HasPrefix(name, ".") || // Unix-like hidden files
|
||||
strings.HasSuffix(name, "~") || // vim
|
||||
(strings.HasPrefix(name, "#") && strings.HasSuffix(name, "#")) // emacs
|
||||
}
|
||||
|
0
config/test-fixtures/dir-temporary-files/.hidden.tf
Normal file
0
config/test-fixtures/dir-temporary-files/.hidden.tf
Normal file
Loading…
Reference in New Issue
Block a user