Closed sdetweil closed 4 months ago
Hi Sam, do not exactly now what you mean.
The module itself only uses only dependencies of node.
If a user wants to call a script he needs to take care about the dependencies by him self. If a error occurs the return code or the output contains a pattern the module can send different notifications.
Found the thread in the forum.
Will add a Readme containing instructions of how to install the deps.
Currently only a comment is in the script itself.
right. the user tries to use the script but it will fail if the python libs or system dep not installed
Done. I added some more documentation to the reame of the example scripts
you could tell if the path is absolute, (starts w /)
and not depend on the user for this
Hi,
sorry but i am again not sure what you mean exactly. There are three scenarios which can happen:
PATH
if the user wants to call a script by its relative path the path will look something like:
if the user want to use a script which is part of the PATH
there will be no starting ./
or /
.
I could add a check if the command does not start with a /
but it contains a /
it is a relative path.
But if the user wants to call a script which is in the scripts
directory (which is my working directory for the script calls) and calls it with lets say randomInteger.js
i do not know if it is a script in the PATH
or in the scripts
directory.
0k. your doc said absolute or relative
absolute to me means from the root /home/pi/...
relative is anything else
so scripts/dht22.py is relative
doesn't need the ./ you can do that.
if it starts w a dot, then don't add ./
just my opinion.. users don't read, don't know file systems..
just trying to reduce trouble reports and user frustration w things not working
you can also build that path and test it, and report if not found...before trying to execute it
Your right. That's definitely a point. I think i can add this easily.
Will do this as fast as I can.
Hi Sam,
just released version 0.0.7 of the module which includes your suggestions of path and permissions checks.
It is possible to run scripts either with or without the ./
now.
Needed to take care about a rare edge case if a user wants to call lets say randomNumber.js
and puts it in his $PATH to call it. I first check if the script is in the scripts
directory now and expect it to be in $PATH it is not there, now.
cool. nice work
user trying to use a script, but it has dependencies that were never installed, or documented to be needed...