I submitted a patch, but here is a pull request as well.
This patch allows users to enter a relative path on the command line rather than needing an absolute path. I ran into this issue when I installed it and it failed. I traced it down to having used ./foo rather than /other/files/foo.
The new code takes the path in core/baseservices and use Abs() to return the path.
The only issue is that your code has a wrapper around the case where err != nil. I did not follow investigate that part well enough to understand if it was needed, or how it should be done.
I submitted a patch, but here is a pull request as well.
This patch allows users to enter a relative path on the command line rather than needing an absolute path. I ran into this issue when I installed it and it failed. I traced it down to having used ./foo rather than /other/files/foo.
The new code takes the path in core/baseservices and use Abs() to return the path.
The only issue is that your code has a wrapper around the case where err != nil. I did not follow investigate that part well enough to understand if it was needed, or how it should be done.