please icon indicating copy to clipboard operation
please copied to clipboard

Pleasew does not handle relative paths correctly

Open cemeceme opened this issue 3 years ago • 1 comments

When a relative path is specified for the location under [Please] in the .plzconfig file, running please through pleasew will fail to create valid symlinks in the specified location.

For instance, if the path location = ./.please is given, then pleasew will create the correct .please directory in the current working directory and successfully download the requested version in another sub-directory within as expected. However, the symbolic links that it tries to create following this are invalid and point relative to the current working directory and not the newly created .please directory. Namely, the please link will point to ./.please/VERSION/please instead of ./VERSION/please.

As a workaround, I have been successful adding LOCATION="${LOCATION/#\.\//$(pwd)/}" right after line 49 in the pleasew file, however this assumes the path to begin with ./.

cemeceme avatar Jun 14 '22 09:06 cemeceme

Thanks for the bug report! Will add this to the backlog but would also be very happy for a PR.

Tatskaari avatar Sep 08 '22 14:09 Tatskaari

This issue has been automatically marked as stale because it has not had any recent activity in the past 90 days. It will be closed if no further activity occurs. If you require additional support, please reply to this message. Thank you for your contributions.

stale[bot] avatar Dec 16 '22 06:12 stale[bot]