Unverified Commit 83527c68 authored by Netanel Haber's avatar Netanel Haber Committed by GitHub
Browse files

fix: same $HOME between install and uninstall (#784)

* fix: same $HOME between install and uninstall

fixes issue https://github.com/datreeio/datree/issues/783.

* PR comments: User facing log should still use ~

PR comments: User facing log should still use ~ instead of expanded variable.

* unwrap apostrophe from here-document head label

this enables parameterization. Also: escaping `\$id -u` so it is input literally.

* revert noise
Showing with 2 additions and 2 deletions
+2 -2
......@@ -5,8 +5,8 @@ create_uninstall_script()
UNINSTALL_SCRIPT="$HOME/.datree/uninstall.sh"
touch $UNINSTALL_SCRIPT && chmod +x $UNINSTALL_SCRIPT
cat >> $UNINSTALL_SCRIPT << 'END'
if [ "$(id -u)" -ne 0 ] ; then
cat > $UNINSTALL_SCRIPT << END
if [ "\$(id -u)" -ne 0 ] ; then
echo "This script must be executed with root privileges." && exit 1
fi
rm -f /usr/local/bin/datree
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment