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

[Support Request] BuiltInCommand Script can not be disabled #187

Closed
ThanasisBarekas opened this issue Feb 9, 2022 · 2 comments
Closed

Comments

@ThanasisBarekas
Copy link

Hello!

I am trying to disable the script built in command. I have successfully managed to disable the help command, but same approach does not seem to work for the other builtInCommands.

I have tried in my main the following :

String[] disabledCommands = {"--spring.shell.command.history.enabled=false"};
String[] fullArgs = StringUtils.concatenateStringArrays(args, disabledCommands);

....

springApplication.run(fullArgs);

The above works for the help command but not for the script.

Do you know maybe why?

Thank you,
Thanasis

@fonimus
Copy link
Owner

fonimus commented Feb 13, 2022

Hello !
I re-wrote three commands (history, stacktrace and script) that I didn't put in the properties.
I did that in the release 1.8.0 to come so will be able to deactivate them.
But then it will fall back to spring shell auto configuration that you can deactivate thanks to spring.shell.command.<name>.enabled properties

I hope that was what you were looking for :)

@fonimus fonimus closed this as completed Feb 13, 2022
@fonimus
Copy link
Owner

fonimus commented Feb 13, 2022

1.8.0 should be published in the next minutes/hours

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

No branches or pull requests

2 participants