rawiriblundell / sh_libpath

Making shell scripts more robust with libraries
Apache License 2.0
11 stars 2 forks source link

Flatten stack dump #25

Open rawiriblundell opened 2 years ago

rawiriblundell commented 2 years ago

We have mixed output styles in the stack dump

Existing:

$ import text/length

20220908_09:29:20_NZST: => START
20220908_09:29:20_NZST: => SH_LIBPATH: checking if /home/rawiri/git/sh_libpath/lib/sh exists... found!
20220908_09:29:20_NZST: => SH_LIBPATH: checking if /home/rawiri/.local/lib/sh exists... found!
20220908_09:29:20_NZST: => SH_LIBPATH: checking if /usr/local/lib/sh exists... not found.
20220908_09:29:20_NZST: => SH_LIBPATH: checking if /opt/sh_libpath/lib/sh exists... not found.
20220908_09:29:20_NZST: => SH_LIBPATH: checking if /usr/share/misc exists... found!
20220908_09:29:20_NZST: => SH_LIBPATH: /home/rawiri/git/sh_libpath/lib/sh:/home/rawiri/.local/lib/sh:/usr/share/misc
20220908_09:29:32_NZST: =>> Entering 'import()' and processing 1 found arg(s): 'text/length'
20220908_09:29:32_NZST: =>> Is 'text/length' a full path to a file?
20220908_09:29:33_NZST: =>> 'text/length' is apparently not a full path to a file.
20220908_09:29:33_NZST: =>> Is 'text/length' a sub-directory within /home/rawiri/git/sh_libpath/lib/sh?
20220908_09:29:33_NZST: =>> 'text/length' is apparently not a sub-directory within /home/rawiri/git/sh_libpath/lib/sh.
20220908_09:29:33_NZST: =>> Is 'text/length' a relative path within /home/rawiri/git/sh_libpath/lib/sh?
20220908_09:29:33_NZST: =>> Is 'text/length' a relative path within /home/rawiri/git/sh_libpath/lib/sh?
20220908_09:29:33_NZST: =>> Is 'text/length' a sub-directory within /home/rawiri/.local/lib/sh?
20220908_09:29:33_NZST: =>> 'text/length' is apparently not a sub-directory within /home/rawiri/.local/lib/sh.
20220908_09:29:33_NZST: =>> Is 'text/length' a relative path within /home/rawiri/.local/lib/sh?
20220908_09:29:33_NZST: =>> Is 'text/length' a relative path within /home/rawiri/.local/lib/sh?
20220908_09:29:33_NZST: =>> Is 'text/length' a sub-directory within /usr/share/misc?
20220908_09:29:33_NZST: =>> 'text/length' is apparently not a sub-directory within /usr/share/misc.
20220908_09:29:33_NZST: =>> Is 'text/length' a relative path within /usr/share/misc?
20220908_09:29:33_NZST: =>> Is 'text/length' a relative path within /usr/share/misc?
import: Unspecified error while executing 'import text/length'

Possibly better:

$ import text/length

+0000: => START at 20220908_09:29:20_NZST
+0000: => Building SH_LIBPATH.  Checking if:
+0000: => /home/rawiri/git/sh_libpath/lib/sh exists..................... [yes]
+0000: => /home/rawiri/.local/lib/sh exists............................. [yes]
+0000: => /usr/local/lib/sh exists....................................... [no]
+0000: => /opt/sh_libpath/lib/sh exists.................................. [no]
+0000: => /usr/share/misc exists........................................ [yes]
+0000: => SH_LIBPATH: /home/rawiri/git/sh_libpath/lib/sh:/home/rawiri/.local/lib/sh:/usr/share/misc
+0012: =>> Entering 'import()' and processing 1 found arg(s): 'text/length'
+0012: =>> Is 'text/length':
+0012: =>> a full path to a file?........................................ [no]
+0013: =>> a sub-directory within /home/rawiri/git/sh_libpath/lib/sh?.... [no]
+0013: =>> a relative path within /home/rawiri/git/sh_libpath/lib/sh?.... [no]
+0013: =>> a sub-directory within /home/rawiri/.local/lib/sh?............ [no]
+0013: =>> a relative path within /home/rawiri/.local/lib/sh?............ [no]
+0013: =>> a sub-directory within /usr/share/misc?....................... [no]
+0013: =>> a relative path within /usr/share/misc?....................... [no]
import: Unspecified error while executing 'import text/length'