mirror of
https://github.com/89luca89/distrobox.git
synced 2026-08-19 01:14:49 -05:00
create/enter: print error messages only when not in dry-run
This commit is contained in:
+6
-6
@@ -290,13 +290,13 @@ esac
|
||||
# Be sure we have a container manager to work with.
|
||||
if ! command -v "${container_manager}" > /dev/null; then
|
||||
# Error: we need at least one between docker or podman.
|
||||
printf >&2 "Missing dependency: we need a container manager.\n"
|
||||
printf >&2 "Please install one of podman or docker.\n"
|
||||
printf >&2 "You can follow the documentation on:\n"
|
||||
printf >&2 "\tman distrobox-compatibility\n"
|
||||
printf >&2 "or:\n"
|
||||
printf >&2 "\thttps://github.com/89luca89/distrobox/blob/main/docs/compatibility.md\n"
|
||||
if [ "${dryrun}" -eq 0 ]; then
|
||||
printf >&2 "Missing dependency: we need a container manager.\n"
|
||||
printf >&2 "Please install one of podman or docker.\n"
|
||||
printf >&2 "You can follow the documentation on:\n"
|
||||
printf >&2 "\tman distrobox-compatibility\n"
|
||||
printf >&2 "or:\n"
|
||||
printf >&2 "\thttps://github.com/89luca89/distrobox/blob/main/docs/compatibility.md\n"
|
||||
exit 127
|
||||
fi
|
||||
fi
|
||||
|
||||
+7
-7
@@ -196,13 +196,13 @@ esac
|
||||
# Be sure we have a container manager to work with.
|
||||
if ! command -v "${container_manager}" > /dev/null; then
|
||||
# Error: we need at least one between docker or podman.
|
||||
printf >&2 "Missing dependency: we need a container manager.\n"
|
||||
printf >&2 "Please install one of podman or docker.\n"
|
||||
printf >&2 "You can follow the documentation on:\n"
|
||||
printf >&2 "\tman distrobox-compatibility\n"
|
||||
printf >&2 "or:\n"
|
||||
printf >&2 "\thttps://github.com/89luca89/distrobox/blob/main/docs/compatibility.md\n"
|
||||
if [ "${dryrun}" -eq 0 ]; then
|
||||
printf >&2 "Missing dependency: we need a container manager.\n"
|
||||
printf >&2 "Please install one of podman or docker.\n"
|
||||
printf >&2 "You can follow the documentation on:\n"
|
||||
printf >&2 "\tman distrobox-compatibility\n"
|
||||
printf >&2 "or:\n"
|
||||
printf >&2 "\thttps://github.com/89luca89/distrobox/blob/main/docs/compatibility.md\n"
|
||||
exit 127
|
||||
fi
|
||||
fi
|
||||
@@ -276,7 +276,7 @@ generate_command() {
|
||||
done
|
||||
|
||||
# Start with the $PATH set in the container's config
|
||||
container_paths="${container_PATH}"
|
||||
container_paths="${container_PATH:-""}"
|
||||
# Ensure the standard FHS program paths are in PATH environment
|
||||
standard_paths="/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin"
|
||||
# add to the PATH after the existing paths, and only if not already present
|
||||
|
||||
Reference in New Issue
Block a user