Skip to content

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

Merged
mosteo merged 1 commit into
masterfrom
interactive_init
Oct 27, 2022
Merged

alr-commands-init.adb: make alr init interactive#1228
mosteo merged 1 commit into
masterfrom
interactive_init

Conversation

@Fabien-Chouteau

Copy link
Copy Markdown
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
Copy Markdown
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

mosteo commented Oct 26, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
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

mosteo commented Oct 27, 2022

Copy link
Copy Markdown
Member

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.

2 participants