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

fix: remove sudoer assumption in install.sh; fix bugs in remove / rename part of install_single_binary #768

Merged
merged 5 commits into from Jan 30, 2024

Conversation

gkc
Copy link
Contributor

@gkc gkc commented Jan 30, 2024

- What I did

  • fix: remove assumption in install.sh that the current user is a sudoer
  • fix: fix buggy code I added to install_single_binary to (1) remove $binary.old if it exists (2) rename current $binary to $binary.old
  • couple of small other things
    • chore: run dart format
    • fix: srv_impl.dart: throw an SshnpError rather than an Exception if the srv binary can't be found

- How to verify it

  • Tested on MacOS as a normal user
  • Tested on an Ubuntu VM as root
  • Tested on an Ubuntu VM as a normal linux user (WITHOUT sudo permission)
  • Tested on an Ubuntu VM as a normal linux user (WITH sudo permission)
  • For each of the above, tested the following scenarios
    • New installation - i.e.
      • no srv or sshnpd in /usr/local/bin
      • no ~/.local/bin directory
    • Repeat installation
    • Remove ~/.local/bin and repeat installation
    • Remove /usr/local/bin/srv* and /usr/local/bin/sshnpd* and repeat installation

fix: fix buggy code I added to install_single_binary to (1) remove $binary.old if it exists (2) rename current $binary to $binary.old
@XavierChanth XavierChanth merged commit afc6719 into trunk Jan 30, 2024
6 checks passed
@gkc gkc deleted the gkc/fix-761-again branch January 30, 2024 13:56
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.

None yet

2 participants