Skip to content

Commit

Permalink
Merge pull request #6947 from psiinon/fix/webswingkali
Browse files Browse the repository at this point in the history
Fix webswing detection
  • Loading branch information
thc202 committed Nov 24, 2021
2 parents 7048402 + a2c73bc commit e454e9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zap/src/main/java/org/parosproxy/paros/Constant.java
Expand Up @@ -297,7 +297,7 @@ public final class Constant {
public static final String FLATPAK_NAME = "flatpak";
private static final String SNAP_FILE = "meta/snap.yaml";
public static final String SNAP_NAME = "snapcraft";
private static final String WEBSWING_ENVVAR = "WEBSWING_VERSION";
private static final String HOME_ENVVAR = "HOME";
public static final String WEBSWING_NAME = "webswing";

//
Expand Down Expand Up @@ -1604,7 +1604,8 @@ public static boolean isInContainer() {
File snapFile = new File(SNAP_FILE);
if (isLinux() && containerFile.exists()) {
inContainer = true;
boolean inWebSwing = System.getenv(WEBSWING_ENVVAR) != null;
String home = System.getenv(HOME_ENVVAR);
boolean inWebSwing = home != null && home.contains(WEBSWING_NAME);
try {
containerName =
new String(
Expand Down

0 comments on commit e454e9f

Please sign in to comment.