-
Notifications
You must be signed in to change notification settings - Fork 3
Fix formatting issues in index.html #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |||||
| else | ||||||
|
|
||||||
| ___x_cmd_inner_cd(){ | ||||||
| command cd "$@" || return $?; | ||||||
| command cd "$@" || return $? ; | ||||||
| }; | ||||||
|
|
||||||
| fi; | ||||||
|
|
@@ -22,15 +22,15 @@ | |||||
|
|
||||||
| local url="https://raw.githubusercontent.com/x-cmd/release/main"; | ||||||
| case "$___X_CMD_VERSION" in | ||||||
| latest|alpha|beta) url="$url/dist/${___X_CMD_VERSION}.tgz" ;; | ||||||
| latest|alpha|beta) url="$url/dist/${___X_CMD_VERSION}. tgz" ;; | ||||||
| v0.1.*|v0.2.*|v0.3.*|v0.4.*|v0.5.0|v0.5.1) | ||||||
| url="$url/dist/${___X_CMD_VERSION}/full.tgz" ;; | ||||||
| url="$url/dist/${___X_CMD_VERSION}/full. tgz" ;; | ||||||
|
||||||
| v*) url="$url/dist/${___X_CMD_VERSION}/allinone.tgz" ;; | ||||||
| *) url="$url/sum/${___X_CMD_VERSION}.tgz" ;; | ||||||
| *) url="$url/sum/${___X_CMD_VERSION}. tgz" ;; | ||||||
|
||||||
| esac; | ||||||
|
|
||||||
| local target="$tmptgt/download_tmp.tgz"; | ||||||
| [ ! -d "${tmptgt}" ] || { | ||||||
| local target="$tmptgt/download_tmp. tgz"; | ||||||
|
||||||
| [ ! -d "${tmptgt}" ] || { | ||||||
| ___x_cmd_get_log "Folder already existed ==> There must be other process is installing x-cmd ==> $tmptgt"; | ||||||
| return 1; | ||||||
| }; | ||||||
|
|
@@ -45,35 +45,35 @@ | |||||
| command wget -O "$target" "$url" 2>/dev/null; | ||||||
| fi || { | ||||||
| command rm -rf "$tmptgt"; | ||||||
| ___x_cmd_get_log "Fail to download from: $url"; | ||||||
| ___x_cmd_get_log "Fail to download from: $url"; | ||||||
| exit 1; | ||||||
| }; | ||||||
|
|
||||||
| ___x_cmd_get_log "Download SUCCESS: $target ( size: $(command wc -c "$target" 2>/dev/null | command awk '{print ((int($1) + 1023 ) / 1024); }') KB )"; | ||||||
| ___x_cmd_get_log "Download SUCCESS: $target ( size: $(command wc -c "$target" 2>/dev/null | command awk '{print ((int($1) + 1023 ) / 1024); }') KB )"; | ||||||
| command touch "$tmptgt/setup.log"; | ||||||
| command tar vxf "$target" 2>>"$tmptgt/setup.log" 1>&2; | ||||||
| ); | ||||||
| }; | ||||||
|
|
||||||
| ___x_cmd_get_populate(){ | ||||||
| local tmptgt="$1"; local sumfp="$tmptgt/.x-cmd/metadata/version_sum"; | ||||||
| [ ! -r "$sumfp" ] || . "$sumfp"; | ||||||
| local tmptgt="$1"; local sumfp="$tmptgt/. x-cmd/metadata/version_sum"; | ||||||
|
||||||
| [ ! -r "$sumfp" ] || . "$sumfp"; | ||||||
|
||||||
| [ ! -r "$sumfp" ] || . "$sumfp"; | |
| [ ! -r "$sumfp" ] || . "$sumfp"; |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space inserted inside the string manipulation pattern breaks the logic. The pattern '#???????? ' (with space) will not match the intended 8 characters. This should be '#????????' without the space. Remove the space.
| ___X_CMD_VERSION_SUM8="${___X_CMD_VERSION_SUM%"${___X_CMD_VERSION_SUM#???????? }"}"; | |
| ___X_CMD_VERSION_SUM8="${___X_CMD_VERSION_SUM%"${___X_CMD_VERSION_SUM#????????}"}"; |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space inserted after the dot breaks the hidden file reference. This creates a path with '. filename' instead of '.filename', which will fail to match archived files. Remove the space.
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space inserted after the dot breaks the hidden directory reference. The path becomes '. dirname' instead of '.dirname', causing directory operations to fail. Remove the space.
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space inserted after the dot in the version string breaks the reference. This should be '.${___X_CMD_VERSION_SUM8}' without a space to match the hidden directory naming convention. Remove the space.
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple issues: space inserted after the dot in the source command ('. ' should be '.'), and space inserted in the version reference ('. ${...' should be '.${...'). Both break functionality. Remove both spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space inserted before 'tgz' breaks the file extension. URLs will be malformed (e.g., 'latest. tgz' instead of 'latest.tgz'), causing download failures. Remove the space to restore correct URL construction.