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

alr-commands-init.adb: make alr init interactive #1228

Merged
merged 1 commit into from
Oct 27, 2022
Merged

Conversation

Fabien-Chouteau
Copy link
Member

Alr init will now queries the user for information such as license, description, tags, etc.

Non-interactive usage is still possible using existing switches.

Alr init will now queries the user for information such as license,
description, tags, etc.

Non-interactive usage is still possible using existing switches.
@Fabien-Chouteau
Copy link
Member Author

Something I forgot to mention in the commit is that non-interactive usage is still possible but it requires the -n switch.

Using only alr init --bin tests will not work automatically as it did before.

@mosteo
Copy link
Member

mosteo commented Oct 26, 2022

So our test suite works because it was already using -n. OK.

Looks good in general, but I tried alr -nq init and I still get a lot of output. What if for scripting we mute the by-default-interactions too?

@Fabien-Chouteau
Copy link
Member Author

I don't mind seeing the default value being used in the non-interactive logs. Do you mean a special case when both -n and -q are used?

@mosteo
Copy link
Member

mosteo commented Oct 27, 2022

You're right that without -n, in this case -q does not make sense. But if the user does use both -n and -q, it seems counter-intuitive to show the mock interactions.

(But I realize we probably have other similar cases (e.g. alr publish) so I'll merge as-is and it can be a future enhancement.)

@mosteo mosteo merged commit da12ff4 into master Oct 27, 2022
@mosteo mosteo deleted the interactive_init branch October 27, 2022 08:39
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.

None yet

2 participants