Skip to content
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

uninstall: fix uninstalling if no symlink in bin_dir #1083

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elhimov
Copy link
Contributor

@elhimov elhimov commented Jan 15, 2025

Closes #900

@elhimov
Copy link
Contributor Author

elhimov commented Jan 15, 2025

Original PR - #997 (closed because there is no way to update it as it has been made in fork)

@elhimov elhimov marked this pull request as draft January 16, 2025 16:13
if err != nil {
return false, err
return false, fmt.Errorf("failed to resolve symlink %q: %s", linkPath, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return false, fmt.Errorf("failed to resolve symlink %q: %s", linkPath, err)
return false, fmt.Errorf("failed to resolve symlink %q: %w", linkPath, err)

_, err = os.Lstat(linkPath)
if err != nil {
if !os.IsNotExist(err) {
return false, fmt.Errorf("failed to access %q: %s", linkPath, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return false, fmt.Errorf("failed to access %q: %s", linkPath, err)
return false, fmt.Errorf("failed to access %q: %w", linkPath, err)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tt uninstall does not work if no symlink in bin_dir
3 participants