-
Notifications
You must be signed in to change notification settings - Fork 90
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
Correction of error message and documentation #504
Conversation
Hey, thanks for looking into this! When you modify the code, ensure to run a pass of lint, so that the formatting is fixed if needed, the doc is regenerated, etc. You can do this just by running: (more details at https://ovh.github.io/the-bastion/development/setup.html#available-tools) |
Hi Stéphane,
Similarly, the lint process seems to change parts I didn't modify, for example : --- a/bin/plugin/restricted/accountAddPersonalAccess
+++ b/bin/plugin/restricted/accountAddPersonalAccess
@@ -184,15 +184,15 @@ osh_info "Can't verify whether $account\'s personal key has been installed to th
my @command = qw{ sudo -n -u allowkeeper -- /usr/bin/env perl -T };
push @command, $OVH::Bastion::BASEPATH . '/bin/helper/osh-accountModifyPersonalAccess';
-push @command, '--target', 'any';
-push @command, '--action', 'add';
-push @command, '--account', $account;
-push @command, '--ip', $ip;
-push @command, '--user', $user if $user;
-push @command, '--port', $port if $port;
-push @command, '--force-key', $forceKey if $forceKey;
+push @command, '--target', 'any';
+push @command, '--action', 'add';
+push @command, '--account', $account;
+push @command, '--ip', $ip;
+push @command, '--user', $user if $user;
+push @command, '--port', $port if $port;
+push @command, '--force-key', $forceKey if $forceKey;
push @command, '--force-password', $forcePassword if $forcePassword;
-push @command, '--ttl', $ttl if $ttl;
-push @command, '--comment', $comment if $comment;
+push @command, '--ttl', $ttl if $ttl;
+push @command, '--comment', $comment if $comment;
osh_exit OVH::Bastion::helper(cmd => \@command); Can you take give me a hint on what I need to do please ? |
Sorry about that, my browser didn't show the helpfull message in the check's result. I don't understand why the same check runing in a docker on my machine got errors on other files, though. |
That's strange, because I can't seem to reproduce: I checked out your branch, ran The run-tool does spawn a docker with a precise version so that perlcritic/perltidy are under a given fixed version for everyone, to ensure we all get the same results. In this case, it's the version shipped with Ubuntu 20.04:
And not the |
Checks seem to pass now, you just need to update the generated documentation, though (part of it is generated from the help of the plugins you fixed): |
OK this make more sense to me now, I took a shortcut and directly ran the command |
Note that the modifications you made in the tests were not really required, as the old parameters still work for backwards compatibility, hence why the tests did pass correctly. But we can keep it that way still :) |
Merci Stéphane ! |
There were an issue with the error message when trying to add a server with
--protocol scpdown
or--protocol scpup
(instead of the correct--protocol scpdownload
or--protocol scpupload
) :Similarly the documentation was wrong on the correct syntaxe for those kind of calls.