Skip to content

Commit

Permalink
Add function to check if /opt/am is read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-hc authored Jun 4, 2024
1 parent 607f3e8 commit 73474ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions APP-MANAGER
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,14 @@ function _am_security_check() {
fi
}

function _check_if_am_is_read_only() {
if [ $AMCLI == am ] 2>/dev/null; then
if [ -w /opt/am ]; then
echo -e " 💀ERROR: /opt/am is read-only, consider using \"am --user\""
fi
fi
}

# Function to check online connections (uses github.com by default, as the database and CLI itself are stored/hosted there)
function _online_check() {
if ! wget -q --tries=10 --timeout=20 --spider https://github.com; then
Expand Down

0 comments on commit 73474ed

Please sign in to comment.