mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix broken compatibility in install
This commit is contained in:
parent
094d1416ca
commit
6820e1e76c
1 changed files with 22 additions and 1 deletions
|
|
@ -32,9 +32,16 @@ error() {
|
|||
}
|
||||
|
||||
# Detect OS
|
||||
# For legacy versions (when SAFE_CHAIN_VERSION is set), use 'linux' instead of 'linuxstatic'
|
||||
detect_os() {
|
||||
case "$(uname -s)" in
|
||||
Linux*) echo "linuxstatic" ;;
|
||||
Linux*)
|
||||
if [ -n "$SAFE_CHAIN_VERSION" ]; then
|
||||
echo "linux"
|
||||
else
|
||||
echo "linuxstatic"
|
||||
fi
|
||||
;;
|
||||
Darwin*) echo "macos" ;;
|
||||
*) error "Unsupported operating system: $(uname -s)" ;;
|
||||
esac
|
||||
|
|
@ -244,6 +251,20 @@ main() {
|
|||
# Parse command-line arguments
|
||||
parse_arguments "$@"
|
||||
|
||||
# Show deprecation warning if SAFE_CHAIN_VERSION is set
|
||||
if [ -n "$SAFE_CHAIN_VERSION" ]; then
|
||||
warn "SAFE_CHAIN_VERSION environment variable is deprecated."
|
||||
warn ""
|
||||
warn "Please use direct download URLs for version pinning instead:"
|
||||
warn ""
|
||||
if [ "$USE_CI_SETUP" = "true" ]; then
|
||||
warn " curl -fsSL https://github.com/AikidoSec/safe-chain/releases/download/${SAFE_CHAIN_VERSION}/install-safe-chain.sh | sh -s -- --ci"
|
||||
else
|
||||
warn " curl -fsSL https://github.com/AikidoSec/safe-chain/releases/download/${SAFE_CHAIN_VERSION}/install-safe-chain.sh | sh"
|
||||
fi
|
||||
warn ""
|
||||
fi
|
||||
|
||||
# Fetch latest version if VERSION is not set
|
||||
if [ -z "$VERSION" ]; then
|
||||
info "Fetching latest release version..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue