Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5d64954

Browse files
Elsie19wizard-28
andauthored
fix(workflow,installer): Add method to skip network check (#323)
* fix(workflow,installer): add environmental variable to skip internet check * Rename skip network check * Change workflow to skip network check * ref(ci): Remove duplicate dependency install Co-authored-by: Sourajyoti Basak <[email protected]>
1 parent f8fd314 commit 5d64954

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/workflow.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
apt install -y sudo bc wget iputils-ping network-manager
3+
export PACSTALL_SKIP_NETWORK_CHECK=1
44
echo "N" | sudo bash -c "$(curl -fsSL https://git.io/JsADh || wget -q https://git.io/JsADh -O -)"
55
useradd -m -d /home/pacstall pacstall
66
usermod -a -G sudo pacstall

install.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ echo -e "|------------------------|"
7070
echo -e "|---${GREEN}Pacstall Installer${NC}---|"
7171
echo -e "|------------------------|"
7272

73-
if ! (command -v nm-online -qx > /dev/null || ping -c 1 github.com > /dev/null); then
74-
fancy_message warn "You seem to be offline"
75-
exit 1
73+
if [[ -n $PACSTALL_SKIP_NETWORK_CHECK ]]; then
74+
if ! (command -v nm-online -qx > /dev/null || ping -c 1 github.com > /dev/null); then
75+
fancy_message warn "You seem to be offline"
76+
exit 1
77+
fi
7678
fi
7779

7880
echo ""

0 commit comments

Comments
 (0)