Skip to content

Commit

Permalink
Remove file touching
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Mar 11, 2024
1 parent 5e8a492 commit cdb6dd0
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/alire/alire-settings-edit.adb
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ package body Alire.Settings.Edit is
Directories.Detect_Root_Path;
begin
if Candidate /= "" then
-- This file cannot have a .toml extension or the root
-- detection will not work.
return Candidate / "alire" / File;
else
Raise_Checked_Error
Expand All @@ -160,12 +158,7 @@ package body Alire.Settings.Edit is
Target_Name => Location (Current));

begin
-- Leave an explanation just in case
Directories.Touch
(Directories.Parent (Location (Old))
/ "config-toml-is-settings-toml-after-alr-2_0");

-- And insert a comment in the old config.toml
-- Insert a comment in the old config.toml
Utils.Text_Files.Replace_Lines
(Location (Old),
Empty_Vector
Expand All @@ -177,7 +170,7 @@ package body Alire.Settings.Edit is
-- Ensure we don't break anything trying to leaving the clues
when E : others =>
Log_Exception (E);
Trace.Debug ("Failed with leaving clues about settings.toml");
Trace.Debug ("Failed when leaving clue about settings.toml");
end;
end if;

Expand Down

0 comments on commit cdb6dd0

Please sign in to comment.