Not to exclude hidden file when creating archive (#1458)
Some of configs are hidden files like .babelrc, we should not ignore them.
This commit is contained in:
+3
-11
@@ -37,7 +37,6 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
fv1 "github.com/fission/fission/pkg/apis/fission.io/v1"
|
||||
"github.com/fission/fission/pkg/fission-cli/console"
|
||||
)
|
||||
|
||||
func UrlForFunction(name, namespace string) string {
|
||||
@@ -103,7 +102,7 @@ func GetTempDir() (string, error) {
|
||||
return dir, err
|
||||
}
|
||||
|
||||
// FindAllGlobs ignores all hidden files and returns a list of globs of input list.
|
||||
// FindAllGlobs returns a list of globs of input list.
|
||||
func FindAllGlobs(paths ...string) ([]string, error) {
|
||||
files := make([]string, 0)
|
||||
for _, p := range paths {
|
||||
@@ -116,15 +115,8 @@ func FindAllGlobs(paths ...string) ([]string, error) {
|
||||
if err != nil {
|
||||
return nil, errors.Errorf("invalid glob %v: %v", path, err)
|
||||
}
|
||||
for _, f := range globs {
|
||||
// ignore hidden file.
|
||||
if strings.HasPrefix(filepath.Base(f), ".") {
|
||||
console.Verbose(2, "Ignore hidden file '%v'", f)
|
||||
continue
|
||||
}
|
||||
files = append(files, f)
|
||||
// xxx handle excludeGlobs here
|
||||
}
|
||||
files = append(files, globs...)
|
||||
// xxx handle excludeGlobs here
|
||||
}
|
||||
return files, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user