diff --git a/packaging/standalone/install.envsubst b/packaging/standalone/install.envsubst index 4b2898e225..15039ec02d 100644 --- a/packaging/standalone/install.envsubst +++ b/packaging/standalone/install.envsubst @@ -264,8 +264,11 @@ install_mise() { cd "$(dirname "$cache_file")" && get_checksum "$version" "$os" "$arch" "$ext" | "$(shasum_bin)" -c >/dev/null # extract tarball + if [ -d "$install_path" ]; then + error "MISE_INSTALL_PATH '$install_path' is a directory. Please set it to a file path, e.g. '$install_path/mise'." + fi mkdir -p "$install_dir" - rm -rf "$install_path" + rm -f "$install_path" extract_dir="$(mktemp -d)" cd "$extract_dir" if [ "$ext" = "tar.zst" ] && ! tar_supports_zstd; then