refactor: standardize on shorthand for redirecting all output to /dev/null
The shorthand is more prevalent in this codebase, and is something that bash supports, so we should just use the same thing everywhere. Note that we do not use shorthand redirect in Makefile as shell parsing is a bit different in Make and the shorthand redirect doesn't seem to be properly supported, causing CI errors.
This commit is contained in:
@@ -8,7 +8,7 @@ fn-builder-herokuish-ensure-cache() {
|
||||
|
||||
existing_cache="$("$DOCKER_BIN" volume ls --quiet --filter label=com.dokku.app-name=test --filter label=com.dokku.builder-type=herokuish)"
|
||||
if [[ "$existing_cache" != "cache-$APP" ]]; then
|
||||
"$DOCKER_BIN" volume rm "cache-$APP" >/dev/null 2>&1 || true
|
||||
"$DOCKER_BIN" volume rm "cache-$APP" &>/dev/null || true
|
||||
"$DOCKER_BIN" volume create "--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.app-name=$APP" "--label=com.dokku.builder-type=herokuish" "cache-$APP" >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ trigger-builder-herokuish-post-app-clone-setup() {
|
||||
local OLD_CACHE_DIR="$DOKKU_ROOT/$OLD_APP/cache"
|
||||
local OLD_CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$OLD_APP/cache"
|
||||
|
||||
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR" >/dev/null 2>&1; then
|
||||
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR" &>/dev/null; then
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$NEW_APP"
|
||||
"$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --rm --volume "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user