Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run OS initialization during elaboration #1592

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

mosteo
Copy link
Member

@mosteo mosteo commented Feb 26, 2024

As this makes impossible to tweak such initialization with alr config.

More precisely, it was now impossible to disable installation of msys2 via alr config --set msys2.do_not_install.

With this PR, msys2 installation is not run unconditionally during elaboration, but later on when we are sure the user is not running alr config (or alr --version)

For good measure, also check that unexpected msys2 installation is not attempted during test runs.

As this makes impossible to tweak such initialization with `alr config`.
@mosteo mosteo marked this pull request as ready for review February 26, 2024 20:00
Comment on lines -33 to -44
declare
Unused : Vector;
begin
Unused := OS_Lib.Subprocess.Checked_Spawn_And_Capture
("pacman", Empty_Vector & ("-V"),
Err_To_Out => True);
return True;
exception when others =>
null;
end;

return False;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caused unintended stderr output when no pacman was found in path

@mosteo mosteo added this to the 2.0 milestone Feb 26, 2024
@mosteo mosteo merged commit b2b96ae into alire-project:master Feb 27, 2024
27 checks passed
@mosteo mosteo deleted the fix/delayed-msys branch February 27, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants