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

Teach should_run_leapp to check for the CLI option #340

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

cPholloway
Copy link
Contributor

Previously, the check used by blockers to determine if the script will run leapp was incompatible with the check option as it only read a file that was written just prior to running stage 1. This updates the check to see if we should run leapp to also check to see if the --no-leapp option was passed via CLI in order to make the sub compatible with the check option.

Fixes #332

By submitting pull requests to this repo, I agree to the Contributor License Agreement which can be found at: https://github.com/cpanel/elevate/blob/main/docs/cPanel-CLA.pdf

Previously, the check used by blockers to determine if the script will
run leapp was incompatible with the check option as it only read a file
that was written just prior to running stage 1.  This updates the check
to see if we should run leapp to also check to see if the --no-leapp
option was passed via CLI in order to make the sub compatible with the
check option.

Fixes cpanel#332
@cPholloway cPholloway requested a review from toddr January 9, 2024 20:13
my $no_leapp = read_stage_file( 'no_leapp', 0 );
# we need to check to see if the no-leapp option is passed via CLI here too in order
# to allow users to run this script with the '--check --no-leapp' options
my $no_leapp = read_stage_file( 'no_leapp', 0 ) || $self->getopt('no-leapp');
Copy link
Member

Choose a reason for hiding this comment

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

should we be checking the getopt first prior to going out to disk? I'm wondering if there are gotchas going in this order.

@toddr toddr merged commit 657c65d into cpanel:main Jan 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Blocker check for containers should not run when --no-leap is passed
2 participants