We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75232cd commit 450f204Copy full SHA for 450f204
.github/actions/ccache-setup/action.yml
@@ -40,10 +40,17 @@ runs:
40
- name: Install ccache
41
shell: bash
42
run: |
43
+ SUDO_CMD="sudo -E"
44
+ if ! command -v sudo &> /dev/null; then
45
+ SUDO_CMD=""
46
+ fi
47
+
48
if ! command -v ccache &> /dev/null; then
49
echo "Installing ccache..."
50
if command -v apt-get &> /dev/null; then
- sudo apt-get update && sudo apt-get install -y ccache
51
+ $SUDO_CMD apt-get update && $SUDO_CMD apt-get install -y ccache
52
+ elif command -v yum &> /dev/null; then
53
+ $SUDO_CMD yum install -y ccache
54
elif command -v brew &> /dev/null; then
55
HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
56
elif command -v choco &> /dev/null; then
0 commit comments