File tree 2 files changed +12
-2
lines changed
src/main/kotlin/com/coder/jetbrains
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import kotlinx.coroutines.launch
18
18
import kotlinx.coroutines.withContext
19
19
import java.io.File
20
20
import org.json.JSONObject
21
+ import com.coder.jetbrains.settings.CoderBackendSettings
21
22
22
23
/* *
23
24
* Automatically forward ports that have something listening on them by scanning
@@ -56,8 +57,7 @@ class CoderPortForwardService(
56
57
}
57
58
58
59
private fun start () {
59
- // TODO: make path configurable?
60
- val devcontainerFile = File (System .getProperty(" user.home" ), " .cache/JetBrains/devcontainer.json" )
60
+ val devcontainerFile = CoderBackendSettings .getDevcontainerFile()
61
61
if (devcontainerFile.exists()) {
62
62
try {
63
63
val json = devcontainerFile.readText()
Original file line number Diff line number Diff line change
1
+ package com.coder.jetbrains.settings
2
+
3
+ import java.io.File
4
+
5
+ object CoderBackendSettings {
6
+ fun getDevcontainerFile (): File {
7
+ // TODO: make path configurable?
8
+ return File (System .getProperty(" user.home" ), " .cache/JetBrains/devcontainer.json" )
9
+ }
10
+ }
You can’t perform that action at this time.
0 commit comments