From 9a5e25e297573851acb9e1a04f323b02848f3fc0 Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Thu, 21 Sep 2023 17:41:49 +0200 Subject: [PATCH] Fix location of default install prefix --- src/alire/alire-install.ads | 7 +++++-- src/alr/alr-commands-install.adb | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/alire/alire-install.ads b/src/alire/alire-install.ads index b684dd099..0b5c13cad 100644 --- a/src/alire/alire-install.ads +++ b/src/alire/alire-install.ads @@ -8,8 +8,11 @@ package Alire.Install is -- Support for installation prefixes - Default_Prefix : constant Absolute_Path - := Platforms.Folders.Home / ".alire"; + Default_Prefix_Basename : constant Relative_Path := ".alire"; + Default_Prefix_Dirname : constant Absolute_Path := Platforms.Folders.Home; + + Default_Prefix : constant Absolute_Path := + Default_Prefix_Dirname / Default_Prefix_Basename; procedure Add (Prefix : Any_Path; Deps : Dependencies.Containers.List); diff --git a/src/alr/alr-commands-install.adb b/src/alr/alr-commands-install.adb index 3bcf17019..7143f0413 100644 --- a/src/alr/alr-commands-install.adb +++ b/src/alr/alr-commands-install.adb @@ -136,7 +136,8 @@ package body Alr.Commands.Install is Cmd.Prefix'Access, "", "--prefix=", "Override installation prefix (default is " - & TTY.URL ("${CRATE_ROOT}/alire/prefix)") & ")"); + & TTY.URL ("${HOME}/" & + Alire.Install.Default_Prefix_Basename) & ")"); Define_Switch (Config, Cmd.Info'Access,