File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ DEFAULT_BRANCH="master"
1414# Variables for custom repository and branch
1515REPO_URL=" $DEFAULT_REPO_URL "
1616BRANCH=" $DEFAULT_BRANCH "
17+ readonly PACKAGE_JSON_URL_MASTER=" https://raw.githubusercontent.com/raghavyuva/nixopus/master/package.json"
1718
1819# Logging functions
1920log_error () { echo -e " ${RED} [ERROR]${NC} $1 " >&2 ; }
@@ -132,16 +133,9 @@ detect_os() {
132133# Get CLI version and package list
133134get_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
You can’t perform that action at this time.
0 commit comments