Skip to content

Commit 1d2ad7f

Browse files
committed
Fix install.sh elevation when using 'uninstall'
1 parent 8a3d96b commit 1d2ad7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ You'll need to open a new shell for this to take effect.
6666
## What if I want to uninstall this?
6767
If you used the automated install script to install notes, you can uninstall it the same way, by running:
6868
```bash
69-
curl -L https://rawgit.com/pimterry/notes/master/install.sh | bash -s uninstall
69+
curl -L https://rawgit.com/pimterry/notes/master/install.sh | bash -s -- uninstall
7070
```
7171

7272
## How do I configure this?

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Yay, Echo self documents! :D
66
echo "Checking for root..."
7-
[ "$(whoami)" != "root" ] && exec sudo -- "$0" "$@"
7+
[ "$(whoami)" != "root" ] && exec sudo -- "$0" -s -- "$@"
88

99
# This has to be defined after root elevation or script will fail.
1010
function assertInstalled() {
@@ -17,7 +17,7 @@ function assertInstalled() {
1717
}
1818

1919
# Make sure we have everything actually installed that we need to install this.
20-
echo "Checking for Dependencies..."
20+
echo "Checking for dependencies..."
2121
assertInstalled bash curl tar mktemp install make
2222

2323
# Variable Definitions go here.

0 commit comments

Comments
 (0)