Skip to content

Commit

Permalink
Suppress stderr output for error-handled commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanjli committed Jun 19, 2024
1 parent 7910aca commit a0041d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,11 @@ main() {
if [ -d "${versioning_dir}" ]; then
warn "The ${versioning_dir} directory already exists, so it will be erased."
confirm "Are you sure you want to continue?"
if ! rm -rf "${versioning_dir}"; then
if ! rm -rf "${versioning_dir}" 2>/dev/null; then
sudo rm -rf "${versioning_dir}"
fi
fi
if ! mkdir -p "${versioning_dir}"; then
if ! mkdir -p "${versioning_dir}" 2>/dev/null; then
sudo mkdir -p "${versioning_dir}"
fi

Expand Down

0 comments on commit a0041d3

Please sign in to comment.