Skip to content

Commit df862ce

Browse files
Copilotbytemain
andauthored
fix: check if sudo command is available before using it in install.sh (#575)
* Initial plan * fix: check if sudo command is available before using it in install.sh Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
1 parent 1ca4237 commit df862ce

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎install.sh‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ main() {
1616
SUDO_CMD=""
1717
else
1818
INSTALL_DIR="/usr/local/bin"
19-
SUDO_CMD="sudo"
19+
# Check if sudo is available
20+
if command -v sudo &> /dev/null; then
21+
SUDO_CMD="sudo"
22+
else
23+
SUDO_CMD=""
24+
fi
2025
fi
2126

2227
# Check if curl or wget is installed

0 commit comments

Comments
 (0)