Skip to content

Commit

Permalink
#286 package errors should be ignored in murex-package list
Browse files Browse the repository at this point in the history
  • Loading branch information
lmorg committed Jul 5, 2024
1 parent 089b97b commit 37b8ce0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
version = "%d.%d.%d"
Major = 6
Minor = 2
Revision = 1000
Revision = 2000
)

// Copyright is the copyright owner string
Expand Down
8 changes: 1 addition & 7 deletions builtins/core/modules/cmd-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"strings"

"github.com/lmorg/murex/config/profile"
"github.com/lmorg/murex/debug"
"github.com/lmorg/murex/lang"
"github.com/lmorg/murex/lang/types"
)
Expand Down Expand Up @@ -101,7 +100,6 @@ func listModulesEnDis(p *lang.Process, enabled bool) (map[string]string, error)

// only read directories
if !f.IsDir() {
debug.Log("File not directory:", pack)
continue
}

Expand All @@ -110,10 +108,7 @@ func listModulesEnDis(p *lang.Process, enabled bool) (map[string]string, error)
continue
}

mods, err := profile.LoadPackage(pack, false)
if err != nil {
write(p, "{RED}%s{RESET}", err.Error())
}
mods, _ := profile.LoadPackage(pack, false)

// these should NOT equate ;)
if strings.HasSuffix(f.Name(), profile.IgnoredExt) != enabled {
Expand Down Expand Up @@ -160,7 +155,6 @@ func listPackages(p *lang.Process) error {
return err
}
if !f.IsDir() {
debug.Log("File not directory:", pack)
continue
}

Expand Down
2 changes: 1 addition & 1 deletion utils/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func read(namespace string, key string, ptr any) bool {

if err := json.Unmarshal(b, ptr); err != nil {
if debug.Enabled {
os.Stderr.WriteString(fmt.Sprintf("Error unmarshalling cache in "+namespace, err))
os.Stderr.WriteString(fmt.Sprintf("!!! error unmarshalling cache in '%s': %s !!!\n!!! cache value: '%s' !!!", namespace, err.Error(), string(b)))
}
return false
}
Expand Down
2 changes: 1 addition & 1 deletion version.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 37b8ce0

Please sign in to comment.