File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ package software.aws.toolkits.jetbrains.utils
5
5
6
6
import com.intellij.idea.AppMode
7
7
import com.intellij.ui.jcef.JBCefApp
8
+ import software.aws.toolkits.core.utils.exists
9
+ import software.aws.toolkits.core.utils.tryOrNull
10
+ import software.aws.toolkits.jetbrains.isDeveloperMode
11
+ import java.nio.file.Paths
8
12
9
13
/* *
10
14
* @return true if running in any type of remote environment
@@ -16,4 +20,20 @@ fun isRunningOnRemoteBackend() = AppMode.isRemoteDevHost()
16
20
*/
17
21
fun isCodeCatalystDevEnv () = System .getenv(" __DEV_ENVIRONMENT_ID" ) != null
18
22
19
- fun isQWebviewsAvailable () = JBCefApp .isSupported()
23
+ /* *
24
+ * @return low fidelity "is internal compute". is not exact and may fail at any time
25
+ */
26
+ private val isInternalAmznLinuxCompute by lazy {
27
+ tryOrNull {
28
+ Paths .get(" /apollo" ).exists()
29
+ } ? : false
30
+ }
31
+
32
+ /* *
33
+ * On remote, only enabled experimentally and for internal
34
+ */
35
+ fun isQWebviewsAvailable () = JBCefApp .isSupported() && if (! isRunningOnRemoteBackend()) {
36
+ true
37
+ } else {
38
+ isDeveloperMode() || isInternalAmznLinuxCompute
39
+ }
You can’t perform that action at this time.
0 commit comments