Skip to content

Commit 4573e68

Browse files
committed
Update Automation task to use --automation flag
1 parent c57da24 commit 4573e68

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/kotlin/myaa/subkt/tasks/asstasks.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,13 +644,14 @@ open class Automation : DefaultTask(), SubTask {
644644
val from = project.objects.fileCollection()
645645

646646
/**
647-
* Filename of script to run.
647+
* Filename of automation script to run.
648648
*
649649
* May be a relative path, absolute path, or a simple filename.
650650
* If a simple filename is provided, Aegisub CLI will search
651651
* for the script in the usual autoload locations.
652652
*/
653653
@get:Input
654+
@get:Optional
654655
val script = project.objects.property<String>()
655656

656657
/**
@@ -844,6 +845,11 @@ open class Automation : DefaultTask(), SubTask {
844845
args.add(keyframesFile.absolutePath)
845846
}
846847

848+
script.orNull?.let {
849+
args.add("--automation")
850+
args.add(it)
851+
}
852+
847853
fileDialog.get().forEach {
848854
args.add("--file")
849855
args.add(it)
@@ -866,7 +872,6 @@ open class Automation : DefaultTask(), SubTask {
866872

867873
args.add(from.singleFile.absolutePath)
868874
args.add(out.singleFile.absolutePath)
869-
args.add(script.get())
870875
args.add(macro.get())
871876

872877
println(args)

0 commit comments

Comments
 (0)