wrap a windows command in quotes. Added a sanitize step
to windows_external_command() plus quote_windows_command()
to deal with all the windows username possibilities
to wrap io.popen and os.execute system calls
respectively. These wrapper functions provide
the necessary quoting on windows to get handle
strings with spaces and special characters.
This makes it feature complete. Some substitutions
aren't implemented since the current use case for
this is creating export directories. The results
from the not implemented substitutions wouldn't
work well in path/file names (such as comma
separated lists or newlines).
the existing function calls in place for backward compatibility. They
now call the new functions in the string library
lib/dtutils.string - Moved the filename/path/extension string functions to the string library
to prevent a circular library depnedency. The file library includes the
string library. If the string library needed to manipulate filename
related strings then the string library would need to include the
file library which would lead to a stack overflow.
script, caller, line number, msg were printed for all log
levels, but changed to return less info except in log.debug
log.error, and log.critical messages. All messages print
the script name except for log.screen.
documentation for check_if_bin_exists. Added save
executable path preference to _search_for_nix_bin()
so that we can save a little time on subsequent runs
once an executable is found.
executable_path variable and another to search for the binary if it
wasn't detected. All results are checked to ensure they exist, are
a file, and are executable. This fixes the situation where a directory
gets stored as an executable path. Search functions are operating system
specific. Executable paths are saved for MacOS and Windows to make for
shorter searches in the future.
ensure a path is a file, directory, or executable respectively. Replaced
code in check_if_bin_exists with these functions to reduce the lines of code
and make it more understandable.
strings of lua "magic" characters before using the string in a string
function that involves matching.
script_manager needs the path to the lua directory sanitized of lua
"magic" characters to prevent failure to extract the category and script
names.