Fix cli issue with headless godot

This commit is contained in:
myaaaaaaaaa 2022-11-01 14:36:54 -04:00
parent 6a6e94ca11
commit 5471950639
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ func _ready():
set_process(false)
var resource_path : String
if Directory.new().file_exists("res://material_maker/main_window.tscn"):
if OS.get_cmdline_args().size() > 0 and (OS.get_cmdline_args()[0] == "--export" or OS.get_cmdline_args()[0] == "--export-material"):
if ("--export" in OS.get_cmdline_args()) or ("--export-material" in OS.get_cmdline_args()):
var output = []
var dir : Directory = Directory.new()
match OS.get_name():