diff --git a/src/amber/cli/commands/exec.cr b/src/amber/cli/commands/exec.cr index 3a5f13575..8504041ac 100644 --- a/src/amber/cli/commands/exec.cr +++ b/src/amber/cli/commands/exec.cr @@ -6,8 +6,14 @@ module Amber::CLI class Exec < Command command_name "exec" - @filename : String = "./tmp/#{Time.now.epoch_ms}_console.cr" - @filelogs : String = @filename.sub("console.cr", "console_result.log") + @filename : String + @filelogs : String + + def initialize(__previous, __argv) + @filename = "./tmp/#{Time.now.epoch_ms}_console.cr" + @filelogs = @filename.sub("console.cr", "console_result.log") + super(__previous, __argv) + end class Options arg "code", desc: "Crystal code or .cr file to execute within the application scope", default: ""