Skip to content

Commit

Permalink
styling
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettrowell committed Feb 14, 2024
1 parent f5dfcda commit 2aa52df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/pdk/cli/convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ module CLI
# Write the context information to the debug log
PDK.context.to_debug_log

raise PDK::CLI::ExitWithError, '`pdk convert` can only be run from inside a valid module directory.' unless PDK.context.is_a?(PDK::Context::Module) ||
PDK.context.is_a?(PDK::Context::ControlRepo)
unless PDK.context.is_a?(PDK::Context::Module) || PDK.context.is_a?(PDK::Context::ControlRepo)
raise PDK::CLI::ExitWithError, '`pdk convert` can only be run from inside a valid module directory.'
end

raise PDK::CLI::ExitWithError, 'You can not specify --noop and --force when converting a module' if opts[:noop] && opts[:force]

Expand Down
5 changes: 3 additions & 2 deletions lib/pdk/cli/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ module CLI
# Write the context information to the debug log
PDK.context.to_debug_log

raise PDK::CLI::ExitWithError, '`pdk update` can only be run from inside a valid module directory.' unless PDK.context.is_a?(PDK::Context::Module) ||
PDK.context.is_a?(PDK::Context::ControlRepo)
unless PDK.context.is_a?(PDK::Context::Module) || PDK.context.is_a?(PDK::Context::ControlRepo)
raise PDK::CLI::ExitWithError, '`pdk update` can only be run from inside a valid module directory.'
end

raise PDK::CLI::ExitWithError, 'This module does not appear to be PDK compatible. To make the module compatible with PDK, run `pdk convert`.' unless PDK::Util.module_pdk_compatible?

Expand Down

0 comments on commit 2aa52df

Please sign in to comment.