◐ Shell
clean mode source ↗

Adding snap classic confinement support by Stefterv · Pull Request #1200 · processing/processing4

catilac

Choose a reason for hiding this comment

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

This LGTM. I left one comment, but it's up to you if you want to address it. Generally, I like to ask questions mostly out of curiosity :)

Comment on lines +256 to +265

if (confinement != "classic") return@let it
// If confinement is not strict, remove the PLUGS section
val start = it.indexOf("# PLUGS START")
val end = it.indexOf("# PLUGS END")
if (start != -1 && end != -1) {
val before = it.substring(0, start)
val after = it.substring(end + "# PLUGS END".length)
return@let before + after
}
return@let it

Choose a reason for hiding this comment

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

could this be moved into a helper function?

Choose a reason for hiding this comment

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

Sure, but it is only being used once, which means it would clutter up the file and be less clear where it is being used