Behave normally when executed without any options.
Search for libraries when library mode is enabled
via the -l or --library options.

Signed-off-by: Matheus Afonso Martins Moreira <math...@matheusmoreira.com>
---
 builtins/source.def | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/builtins/source.def b/builtins/source.def
index 8ca9631f..13c5162e 100644
--- a/builtins/source.def
+++ b/builtins/source.def
@@ -170,7 +170,10 @@ source_builtin (list)
     }
 #endif
 
-  filename = search_for_file (list);
+  if (!library_mode)
+    filename = search_for_file (list);
+  else
+    filename = search_for_library (list);
 
   if (filename == 0)
     {
-- 
2.44.0


Reply via email to