Skip to content
Discussion options

You must be logged in to vote

sudo/doas usage is already built in

AM/APP-MANAGER

Lines 329 to 336 in a653b79

if command -v sudo >/dev/null 2>&1; then
export SUDOCMD="sudo"
elif command -v doas >/dev/null 2>&1; then
export SUDOCMD="doas"
else
echo $'ERROR: No sudo or doas found'
exit 1
fi

about using it in other scripts, of course you can do it. But use directly the command, without sudo/doas.

I'm not good in Python, but I use AM in shell script for my workflows, like this below (see the am -i references)

https://github.com/ivan-hc/amcheck/blob/9a7785af620b5930328dcf67c1d734c9926c7a45/.github/workflows/AMCHECK.yml#L353-L395

But if you need to run AM without root prvi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@micmejia
Comment options

Answer selected by micmejia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants