@@ -22,11 +22,12 @@ import (
2222)
2323
2424const (
25- defaultDaprDirName = ".dapr"
26- defaultDaprBinDirName = "bin"
27- defaultComponentsDirName = "components"
28- defaultResourcesDirName = "resources"
29- defaultConfigFileName = "config.yaml"
25+ DefaultComponentsDirName = "components"
26+ DefaultResourcesDirName = "resources"
27+
28+ defaultDaprDirName = ".dapr"
29+ defaultDaprBinDirName = "bin"
30+ defaultConfigFileName = "config.yaml"
3031)
3132
3233func defaultDaprDirPath () string {
@@ -47,11 +48,11 @@ func binaryFilePath(binaryDir string, binaryFilePrefix string) string {
4748}
4849
4950func DefaultComponentsDirPath () string {
50- return path_filepath .Join (defaultDaprDirPath (), defaultComponentsDirName )
51+ return path_filepath .Join (defaultDaprDirPath (), DefaultComponentsDirName )
5152}
5253
5354func DefaultResourcesDirPath () string {
54- return path_filepath .Join (defaultDaprDirPath (), defaultResourcesDirName )
55+ return path_filepath .Join (defaultDaprDirPath (), DefaultResourcesDirName )
5556}
5657
5758// DefaultResourcesDirPrecedence returns the path to the resources directory if it exists, or otherwise the components directory.
@@ -72,7 +73,8 @@ func DefaultConfigFilePath() string {
7273// TODO: Remove this function when `--components-path` flag is removed.
7374func emptyAndCopyFiles (src , dest string ) error {
7475 if _ , err := os .Stat (src ); err != nil {
75- return err
76+ // if the src directory does not exist, return nil, because there is nothing to copy from.
77+ return nil
7678 }
7779 files , err := os .ReadDir (dest )
7880 if err != nil {
0 commit comments