Skip to content

Commit

Permalink
Fix list-spells and add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
machaval committed Nov 24, 2021
1 parent d0f07c3 commit 2bb2476
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mule.weave.dwnative.cli

import org.mule.weave.dwnative.NativeRuntime
import org.mule.weave.dwnative.cli.commands.CloneWizardCommand
import org.mule.weave.dwnative.cli.commands.AddWizardCommand
import org.mule.weave.dwnative.cli.commands.CloneWizardConfig
import org.mule.weave.dwnative.cli.commands.ListSpellsCommand
import org.mule.weave.dwnative.cli.commands.RunWeaveCommand
Expand Down Expand Up @@ -84,9 +84,9 @@ class CLIArgumentsParser(console: Console) {
if (i + 1 < args.length) {
i = i + 1
val wizardName = args(i)
return Left(new CloneWizardCommand(CloneWizardConfig(wizardName), console))
return Left(new AddWizardCommand(CloneWizardConfig(wizardName), console))
} else {
return Right("Missing <outputPath>")
return Right("Missing <wizard-name>")
}
}
case "--clean-cache" => {
Expand Down Expand Up @@ -120,7 +120,7 @@ class CLIArgumentsParser(console: Console) {

var wizardGrimoire: File = utils.grimoireFolder(wizard)
if (!wizardGrimoire.exists()) {
new CloneWizardCommand(CloneWizardConfig(wizard), console).exec()
new AddWizardCommand(CloneWizardConfig(wizard), console).exec()
}
wizardGrimoire = utils.grimoireFolder(wizard)
val wizardName = if (wizard == null) "Weave" else wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.mule.weave.dwnative.cli.commands
import org.mule.weave.dwnative.cli.Console
import org.mule.weave.dwnative.cli.utils.SpellsUtils

class CloneWizardCommand(config: CloneWizardConfig, console: Console) extends WeaveCommand {
class AddWizardCommand(config: CloneWizardConfig, console: Console) extends WeaveCommand {

private val utils = new SpellsUtils(console)

Expand Down

0 comments on commit 2bb2476

Please sign in to comment.