mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-03-21 06:36:27 +02:00
silence hooks watch errors and just print as warning
This commit is contained in:
parent
106ce0f0c4
commit
8c71a291ff
@ -224,7 +224,7 @@ func (p *plugin) registerHooks() error {
|
|||||||
// initialize the hooks dir watcher
|
// initialize the hooks dir watcher
|
||||||
if p.config.HooksWatch {
|
if p.config.HooksWatch {
|
||||||
if err := p.watchHooks(); err != nil {
|
if err := p.watchHooks(); err != nil {
|
||||||
return err
|
color.Yellow("Unable to init hooks watcher: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,7 +356,7 @@ func (p *plugin) watchHooks() error {
|
|||||||
if hooksDirInfo.Mode()&os.ModeSymlink == os.ModeSymlink {
|
if hooksDirInfo.Mode()&os.ModeSymlink == os.ModeSymlink {
|
||||||
watchDir, err = filepath.EvalSymlinks(p.config.HooksDir)
|
watchDir, err = filepath.EvalSymlinks(p.config.HooksDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return fmt.Errorf("failed to resolve hooksDir symink: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user