I’m building a couple of PS scripts to automate tasks in a repository and was wondering whether I could get some opinions on this:
Should I accept paths to important files as parameters, or derive them based on where I know the script is in the repository?
The former is more resistant to the script being moved and could allow for ‘dry runs’ if writing to a temp directory, but the latter is easier to just ‘double click and run’, albeit requiring the script to be updated if the repo is reorganised.