Skip to content

Commit

Permalink
Users can now specify MIRRORD_ACTIVE=1 in run configuration's environ…
Browse files Browse the repository at this point in the history
…ment variable to explicitly enable mirrord regardless of the button status (#232)
  • Loading branch information
aviramha authored Jan 10, 2024
1 parent e7eaa09 commit 49ca287
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/231.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Users can now specify MIRRORD_ACTIVE=1 in run configuration's environment variable to explicitly enable mirrord regardless of the button status
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ class MirrordExecManager(private val service: MirrordProjectService) {
projectEnvVars: Map<String, String>?
): Pair<Map<String, String>, String?>? {
MirrordLogger.logger.debug("MirrordExecManager.start")
if (!service.enabled) {
val explicitlyEnabled = projectEnvVars?.any { (key, value) -> key == "MIRRORD_ACTIVE" && value == "1" } ?: false
if (!service.enabled && !explicitlyEnabled) {
MirrordLogger.logger.debug("disabled, returning")
return null
}
Expand Down

0 comments on commit 49ca287

Please sign in to comment.