Skip to content

Commit

Permalink
Skip the step
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Sep 18, 2019
1 parent d86764b commit 3c15b5e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Expand Up @@ -37,6 +37,11 @@ class InstRepositoriesInitialization
def main
textdomain "packager"

if Y2Packager::MediumType.skip_step?
log.info "Skipping the client"
return :auto
end

if !init_installation_repositories
Yast::Popup.Error(
_("Failed to initialize the software repositories.\nAborting the installation.")
Expand Down
15 changes: 15 additions & 0 deletions src/lib/y2packager/medium_type.rb
Expand Up @@ -58,6 +58,21 @@ def standard?
type == :standard
end

# Helper method which evaluates the client arguments and the installation
# medium type and returns whether the client should be skipped.
#
# @return [Boolean] True if the client should be skipped.
#
def skip_step?
skip = Yast::WFM.Args(0)["skip"]
return true if skip && skip.split(",").include?(type.to_s)

only = Yast::WFM.Args(0)["only"]
return true if only && !only.split(",").include?(type.to_s)

false
end

private

#
Expand Down

0 comments on commit 3c15b5e

Please sign in to comment.