Skip to content

Commit e73ec7d

Browse files
committed
fix error handle on path not present
Signed-off-by: Pravin Pushkar <[email protected]>
1 parent d8422a7 commit e73ec7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/standalone/common.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ func DefaultConfigFilePath() string {
7474
func emptyAndCopyFiles(src, dest string) error {
7575
if _, err := os.Stat(src); err != nil {
7676
// if the src directory does not exist, return nil, because there is nothing to copy from.
77-
return nil
77+
if os.IsNotExist(err) {
78+
return nil
79+
}
80+
return err
7881
}
7982
files, err := os.ReadDir(dest)
8083
if err != nil {

0 commit comments

Comments
 (0)