-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
This does not seem to be handling output file options correctly if called from a nested directory, and GDE is told the project root via CLI.
For example:
/ (root) (git dir)
-/ project_a
-/ project_a / test.txt
If I cd
to project_a
, and run something like:
echo "project_a/test.txt" | xargs git-date-extractor --projectRootPath=".." --outputToFile
I neither get the output file generated at ../timestamps.json
(which could be one expected result, given that I told it that project root was a level up), nor at project_a/timestamps.json
, since that is calling dir... I get the generated output file at ../../timestamps.json
, which is entirely outside the project directory itself!
In general, there seems to be a few issues if projectRootPath
is passed as a relative path (e.g. =".."
) instead of an absolute path by using something like __dirname
, %cd%
, or $PWD
. I should probably improve the logic for parsing that CLI argument and determining the true absolute project root path. Even though I would suggest that users use absolute paths as input args whenever possible, this still really should be improved beyond how it currently is acting.