-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
which handles broken symlink & unit test added (#2150) #2196
which handles broken symlink & unit test added (#2150) #2196
Conversation
5a7ff8a
to
385c4f6
Compare
@nikola-jokic the |
Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
It looks like my suggestion didn't exactly use valid syntax, @Eliminator1999 😅 |
no worries, i will fix it together with the test |
@fhammerl, @nikola-jokic, I hope I am not bothering you, can you approve the workflow? |
@eli-entelis Glancing at the failing L0 / unit-test, it seems like we fail to get the location of |
… test that check symlink that targets a full path; added test that check symlink that targets a relative path;
@eli-entelis looks like the new tests aren't passing. Do they have any dependencies on the system you're running? |
@fhammerl I was finally able to test another platform and find some issues. hopefully, now it will work. |
@fhammerl all the tests has passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
We'll aim to merge it for the next release.
cool! thanks |
…s#2196) * which handles broken symlink & unit test added (actions#2150) * Update src/Runner.Sdk/Util/WhichUtil.cs Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com> * fix pr comments * trace log added, in case we find a symlink that is broken * add check in case the target of the symlink is a relative path; added test that check symlink that targets a full path; added test that check symlink that targets a relative path; * fix tests * fix tests for linux --------- Co-authored-by: Eli Entelis <eli.entelis@hexagon.com> Co-authored-by: Eli Entelis <42981948+Eliminator1999@users.noreply.github.com> Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
pull request related to issue #2150
if there is a match from $PATH of some
command
, there is a check if the match is a symbolic link, if so we also look at the target. if the target does not exist we ignore it.a sort of integration test is added which
WhichThrowsWhenSymlinkBroken
which temporarily creates a symlink that targets a non-existent file"no-such-file-cf7e351f"
and also adds to $PATH environment variable the directory of the temporary symlink (which is created atPath.GetTempPath()
)