mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Merge pull request #280 from AikidoSec/fix-broken-compatibility-in-install-beta
Fix broken compatibility in install
This commit is contained in:
commit
4a63f976ae
2 changed files with 36 additions and 1 deletions
|
|
@ -149,6 +149,20 @@ function Remove-VoltaInstallation {
|
|||
|
||||
# Main installation
|
||||
function Install-SafeChain {
|
||||
# Show deprecation warning if SAFE_CHAIN_VERSION is set
|
||||
if (-not [string]::IsNullOrWhiteSpace($env:SAFE_CHAIN_VERSION)) {
|
||||
Write-Warn "SAFE_CHAIN_VERSION environment variable is deprecated."
|
||||
Write-Warn ""
|
||||
Write-Warn "Please use direct download URLs for version pinning instead:"
|
||||
Write-Warn ""
|
||||
if ($ci) {
|
||||
Write-Warn " iex `"& { `$(iwr 'https://github.com/AikidoSec/safe-chain/releases/download/$env:SAFE_CHAIN_VERSION/install-safe-chain.ps1' -UseBasicParsing) } -ci`""
|
||||
} else {
|
||||
Write-Warn " iex (iwr `"https://github.com/AikidoSec/safe-chain/releases/download/$env:SAFE_CHAIN_VERSION/install-safe-chain.ps1`" -UseBasicParsing)"
|
||||
}
|
||||
Write-Warn ""
|
||||
}
|
||||
|
||||
# Fetch latest version if VERSION is not set
|
||||
if ([string]::IsNullOrWhiteSpace($Version)) {
|
||||
Write-Info "Fetching latest release version..."
|
||||
|
|
|
|||
|
|
@ -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