v2.7.4 (#579)
Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai> Co-authored-by: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai> Co-authored-by: Lucas Marandat <31749711+lucasmrdt@users.noreply.github.com> Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com> Co-authored-by: Paul Cacheux <paul.cacheux@mistral.ai> Co-authored-by: Peter Evers <pevers90@gmail.com> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Pierre Rossinès <pierre.rossines@protonmail.com> Co-authored-by: Quentin <quentin.torroba@mistral.ai> Co-authored-by: Simon Van de Kerckhove <simon.vandekerckhove@mistral.ai> Co-authored-by: Val <102326092+vdeva@users.noreply.github.com> Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
90763daf81
commit
e9a9217cc8
113 changed files with 7202 additions and 541 deletions
|
|
@ -12,6 +12,8 @@ YELLOW='\033[1;33m'
|
|||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
ORIGINAL_PATH="${PATH}"
|
||||
|
||||
function error() {
|
||||
echo -e "${RED}[ERROR]${NC} $1" >&2
|
||||
}
|
||||
|
|
@ -28,6 +30,24 @@ function warning() {
|
|||
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||||
}
|
||||
|
||||
function find_command_in_path() {
|
||||
local cmd="$1"
|
||||
local path_value="$2"
|
||||
PATH="$path_value" command -v "$cmd" 2>/dev/null || true
|
||||
}
|
||||
|
||||
function print_missing_path_instructions() {
|
||||
local executable_name="$1"
|
||||
local executable_path="$2"
|
||||
local bin_dir
|
||||
bin_dir=$(dirname "$executable_path")
|
||||
|
||||
warning "Installation completed, and '$executable_name' was installed at: $executable_path"
|
||||
error "Your PATH does not include the folder that contains '$executable_name'."
|
||||
error "Add this directory to your shell profile, then restart your terminal:"
|
||||
error " export PATH=\"$bin_dir:\$PATH\""
|
||||
}
|
||||
|
||||
function check_platform() {
|
||||
local platform=$(uname -s)
|
||||
|
||||
|
|
@ -45,7 +65,7 @@ function check_platform() {
|
|||
}
|
||||
|
||||
function check_uv_installed() {
|
||||
if command -v uv &> /dev/null; then
|
||||
if command -v uv >/dev/null 2>&1; then
|
||||
info "uv is already installed: $(uv --version)"
|
||||
UV_INSTALLED=true
|
||||
else
|
||||
|
|
@ -79,12 +99,21 @@ function install_uv() {
|
|||
}
|
||||
|
||||
function check_vibe_installed() {
|
||||
if command -v vibe &> /dev/null; then
|
||||
if [[ -n "$(find_command_in_path vibe "$ORIGINAL_PATH")" ]]; then
|
||||
info "vibe is already installed"
|
||||
VIBE_INSTALLED=true
|
||||
else
|
||||
VIBE_INSTALLED=false
|
||||
return
|
||||
fi
|
||||
|
||||
local uv_bin_dir
|
||||
uv_bin_dir=$(uv tool dir --bin 2>/dev/null || true)
|
||||
if [[ -n "$uv_bin_dir" && -x "$uv_bin_dir/vibe" ]]; then
|
||||
info "vibe is already installed (off PATH) at $uv_bin_dir/vibe"
|
||||
VIBE_INSTALLED=true
|
||||
return
|
||||
fi
|
||||
|
||||
VIBE_INSTALLED=false
|
||||
}
|
||||
|
||||
function install_vibe() {
|
||||
|
|
@ -132,7 +161,7 @@ function main() {
|
|||
update_vibe
|
||||
fi
|
||||
|
||||
if command -v vibe &> /dev/null; then
|
||||
if [[ -n "$(find_command_in_path vibe "$ORIGINAL_PATH")" ]]; then
|
||||
success "Installation completed successfully!"
|
||||
echo
|
||||
echo "You can now run vibe with:"
|
||||
|
|
@ -141,8 +170,20 @@ function main() {
|
|||
echo "Or for ACP mode:"
|
||||
echo " vibe-acp"
|
||||
else
|
||||
error "Installation completed but 'vibe' command not found"
|
||||
error "Please check your installation and PATH settings"
|
||||
local UV_BIN_DIR
|
||||
local VIBE_BIN_PATH=""
|
||||
UV_BIN_DIR=$(uv tool dir --bin 2>/dev/null || true)
|
||||
if [[ -n "$UV_BIN_DIR" && -x "$UV_BIN_DIR/vibe" ]]; then
|
||||
VIBE_BIN_PATH="$UV_BIN_DIR/vibe"
|
||||
fi
|
||||
|
||||
if [[ -n "$VIBE_BIN_PATH" ]]; then
|
||||
print_missing_path_instructions "vibe" "$VIBE_BIN_PATH"
|
||||
else
|
||||
error "Installation completed but 'vibe' command not found"
|
||||
error "uv did not expose a 'vibe' executable in the expected tools directory."
|
||||
error "Please check your installation and PATH settings"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue