Skip to content

Commit

Permalink
option to disable union_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Dec 10, 2024
1 parent b63d1e7 commit ac202f5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions try
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ then
autodetect_union_helper
fi
if [ "$UNION_HELPER" == "/dev/null" ]
then
unset UNION_HELPER
fi
# actually mount the overlays
for mountpoint in $(cat "$UPDATED_DIRS_AND_MOUNTS")
do
Expand Down Expand Up @@ -234,7 +239,7 @@ do
if [ -z "$UNION_HELPER" ]
then
## We can ignore this mountpoint, if the user program tries to use it, it will crash, but if not we can run normally
printf "%s: Warning: Failed mounting $mountpoint as an overlay and mergerfs or unionfs not set and could not be found, see \"$try_mount_log\"\n" "$TRY_COMMAND" >&2
printf "%s: Warning: Failed mounting $mountpoint as an overlay, and mergerfs or unionfs not set, could not be found, or disabled, see \"$try_mount_log\"\n" "$TRY_COMMAND" >&2
else
merger_dir="$SANDBOX_DIR"/mergerdir."$(echo "$pure_mountpoint" | tr '/' '.')"
mkdir "$merger_dir"
Expand Down Expand Up @@ -599,7 +604,7 @@ Usage: $TRY_COMMAND [-nvhyx] [-i PATTERN] [-D DIR] [-U PATH] [-L dir1:dir2:...]
-x prevent network access (by unsharing the network namespace)
-i PATTERN ignore paths that match PATTERN on summary and commit
-D DIR work in DIR (implies -n)
-U PATH path to unionfs helper (e.g., mergerfs, unionfs-fuse)
-U PATH path to unionfs helper (e.g., mergerfs, unionfs-fuse), set to /dev/null to disable
-L dir1:dir2:... specify multiple lower directories to merge (colon-separated, implies -n)
-v show version information (and exit)
-h show this usage message (and exit)
Expand Down Expand Up @@ -647,7 +652,7 @@ do
NO_COMMIT="quiet";;
(v) echo "$TRY_COMMAND version $TRY_VERSION" >&2
exit 0;;
(U) if ! [ -x "$OPTARG" ]
(U) if ! [ -x "$OPTARG" ] && [ "$OPTARG" != "/dev/null" ]
then
error "could not find executable union helper '$OPTARG'" 2
fi
Expand Down

0 comments on commit ac202f5

Please sign in to comment.