Error Loading Configuration

I think I missed an issue with the recent PR for automatically discovering the root-dir. When I attempt to create a staging (uberspark staging create) I receive the following error.

uberspark >> loading current configuration...uberspark >> config_ns_json_path=/home/slab/Code/uberspark/~/uberspark/staging/current/uberspark/config/uberspark.json
uberspark: internal error, uncaught exception:
     Sys_error("/home/slab/Code/uberspark/~/uberspark/staging/current/uberspark/config/uberspark.json: No such file or directory")
     Raised by primitive operation at file "", line 398, characters 28-54

It seems that it is attempting to use the current path as well as the configuration path. As I am making the uberspark command from /home/slab/Code/uberspark, and the correct root directory is ~/uberspark/

Linked PR:

I think I might know what the issue is. Can you replace ROOT_DIR on line 9 of the top-level Makefile:



and give it a test?


That is very close to a fix. I still had a path error (e.g., $PWD/${HOME}/uberspark/*). Changing it to only have a single $ seems to work correctly (i.e. ROOT_DIR ?= ${HOME})

I created a PR with this fix.

Thanks @Cap,

Can you also make the following change to line 129 to handle WSL development environments:

You need to change line 129 to:

ifeq "$(ROOT_DIR)" "${HOME}"

Let me know once you have updated the PR, I can test on my WSL environment and then merge.

I incorporated the change on line 129. This works on my ubuntu vm. PR updated.

Linking PR to OP. Am proceeding to give it a test on my WSL dev. box.

Successfully tested with WSL as well. Merged PR and closing thread. Thanks @Cap!