From 2da3064b86780105f5482114be6a50205fb86899 Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Fri, 27 Oct 2023 17:47:58 -0400 Subject: [PATCH] fix(net): check if var is empty instead of matching strings --- try | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/try b/try index 584462f8..79b61fdf 100755 --- a/try +++ b/try @@ -233,10 +233,10 @@ EOF # --pid: create a new process namespace (needed fr procfs to work right) # --fork: necessary if we do --pid # "Creation of a persistent PID namespace will fail if the --fork option is not also specified." - if [ "$EXTRA_NS" = "net" ]; then - unshare --mount --map-root-user --user --pid --fork --net "$mount_and_execute" - else + if [ -z "$EXTRA_NS" ]; then unshare --mount --map-root-user --user --pid --fork "$mount_and_execute" + else + unshare --mount --map-root-user --user --pid --fork --net "$mount_and_execute" fi TRY_EXIT_STATUS=$?