Skip to content

Commit f6fa144

Browse files
committed
hotfix: uses default package json for referring to cli version always to get latest cli package
1 parent c012936 commit f6fa144

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

scripts/install.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ DEFAULT_BRANCH="master"
1414
# Variables for custom repository and branch
1515
REPO_URL="$DEFAULT_REPO_URL"
1616
BRANCH="$DEFAULT_BRANCH"
17+
readonly PACKAGE_JSON_URL_MASTER="https://raw.githubusercontent.com/raghavyuva/nixopus/master/package.json"
1718

1819
# Logging functions
1920
log_error() { echo -e "${RED}[ERROR]${NC} $1" >&2; }
@@ -132,16 +133,9 @@ detect_os() {
132133
# Get CLI version and package list
133134
get_package_info() {
134135
local package_json
135-
local package_json_url
136-
137-
# Extract repository owner and name from URL
138-
local repo_owner_name
139-
repo_owner_name=$(echo "$REPO_URL" | sed 's|https://github.com/||')
140-
package_json_url="https://raw.githubusercontent.com/$repo_owner_name/$BRANCH/package.json"
141-
142-
package_json=$(curl -fsSL "$package_json_url" 2>/dev/null || true)
136+
package_json=$(curl -fsSL "$PACKAGE_JSON_URL_MASTER" 2>/dev/null || true)
143137
if [[ -z "$package_json" || "$package_json" != \{* ]]; then
144-
log_error "Failed to fetch package.json from $BRANCH branch of $REPO_URL"
138+
log_error "Failed to fetch package.json from master branch"
145139
exit 1
146140
fi
147141

0 commit comments

Comments
 (0)