Skip to content

Commit

Permalink
Pass env vars into rdk (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniels authored Apr 8, 2024
1 parent dacefd2 commit 3b16e98
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import android.os.IBinder
import android.preference.PreferenceManager
import android.util.Log
import androidx.compose.runtime.mutableStateOf
import droid.Droid.mainEntry
import droid.Droid.droidStopHook
import droid.Droid.mainEntry
import java.io.File
import java.nio.file.StandardWatchEventKinds
import java.util.Timer
Expand Down Expand Up @@ -102,7 +102,8 @@ class RDKThread() : Thread() {
// todo: I think we crash the entire process if the viam.json config fails to parse; be more graceful
try {
status = RDKStatus.RUNNING
mainEntry(path.toString(), filesDir.toString())
val osEnv = System.getenv().entries.joinToString(separator = "\n") { "${it.key}=${it.value}" }
mainEntry(path.toString(), filesDir.toString(), osEnv)
} catch (e: Exception) {
Log.e(TAG, "viam thread caught error $e")
} finally {
Expand Down

0 comments on commit 3b16e98

Please sign in to comment.