Hey all,
I am dot sourcing a function from an original script which in itself would dot course another function. I am looking for a way to determine the file location of the first dot sourced function so I can create a relative link to the second dot sourced location (relative to the first). The first/second function file should always be in the same directory.
When running a `Get-Location` within the first dot source file, it seems as if the original script location is referenced. It may be the the calling function isn’t always in the same location, indeed the dot sourced function might not be in the same place, but both function files should be in the same folder.
I have worked around this by dot sourcing both file in the original script, but this might not always be known.