Skip to content

Commit 2aa52df

Browse files
committed
styling
1 parent f5dfcda commit 2aa52df

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/pdk/cli/convert.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ module CLI
1818
# Write the context information to the debug log
1919
PDK.context.to_debug_log
2020

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

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

lib/pdk/cli/update.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ module CLI
1414
# Write the context information to the debug log
1515
PDK.context.to_debug_log
1616

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

2021
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?
2122

0 commit comments

Comments
 (0)