U
Une Bévue
Is tehre a way to test if a ruby script is run as a sudoer user ?
For the time being i'm using a zsh script to test that however I'd like
using ruby only.
the zsh i'm using :
#! /usr/bin/env zsh
[ "$SUDO_USER" -a `id -u` -eq 0 ] || {
echo "false"
exit 0
}
echo "true"
exit 0
For the time being i'm using a zsh script to test that however I'd like
using ruby only.
the zsh i'm using :
#! /usr/bin/env zsh
[ "$SUDO_USER" -a `id -u` -eq 0 ] || {
echo "false"
exit 0
}
echo "true"
exit 0