Skip to content

Commit 47d329c

Browse files
Return error when glob pattern matching fails for apps (#2850)
## Why Minor UX improvement. Provides users with context for why searching for *.py files failed for them. Prompted by: #2843 (review) ## Tests Not tested.
1 parent 7703e14 commit 47d329c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libs/apps/python.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package apps
22

33
import (
44
"errors"
5+
"fmt"
56
"os"
67
"os/exec"
78
"path/filepath"
@@ -88,7 +89,7 @@ func (p *PythonApp) GetCommand(debug bool) ([]string, error) {
8889
if len(spec.Command) == 0 {
8990
files, err := filepath.Glob(filepath.Join(spec.config.AppPath, "*.py"))
9091
if err != nil {
91-
return nil, errors.New("Error reading source code directory")
92+
return nil, fmt.Errorf("Error reading source code directory: %w", err)
9293
}
9394

9495
if len(files) > 0 {

0 commit comments

Comments
 (0)