Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Option to redirect output and keep it on exit. #32

Merged
merged 1 commit into from
Oct 4, 2017

Conversation

yunikkk
Copy link
Contributor

@yunikkk yunikkk commented Oct 2, 2017

No description provided.

args.redirectOutputTo ?: "",
"${args.emulatorName}.output"
)
.apply { if (!args.keepOutputOnExit) deleteOnExit() }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting seems wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, you mean the indent?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private fun outputFileForEmulator(args: Commands.Start) = File(args.redirectOutputTo ?: "", "${args.emulatorName}.output").apply {
    if (!args.keepOutputOnExit) deleteOnExit()
}

or

private fun outputFileForEmulator(args: Commands.Start) =
    File(args.redirectOutputTo ?: "", "${args.emulatorName}.output").apply {
        if (!args.keepOutputOnExit) deleteOnExit()
    }

Not sure what auto-formatter will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok with 2 one

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another one:

private fun outputFileForEmulator(args: Commands.Start) =
        File(
                args.redirectOutputTo ?: "",
                "${args.emulatorName}.output"
        ).apply {
            if (!args.keepOutputOnExit) deleteOnExit()
        }

@yunikkk yunikkk force-pushed the keep-output-on-exit branch from 07ead26 to eef36db Compare October 3, 2017 09:14
@yunikkk yunikkk merged commit f74c96f into gojuno:master Oct 4, 2017
@artem-zinnatullin
Copy link
Contributor

Niice, thanks!

yunikkk added a commit to yunikkk/swarmer that referenced this pull request Oct 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants