Skip to content

Commit

Permalink
replace tilde with $HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Nov 1, 2023
1 parent 5c8d5a6 commit c04f658
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions smoketest.bash
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ for file in "${FILES[@]}"; do
CMD+=(-f "${file}")
done

HOSTSFILE="${HOSTSFILE:-~/.hosts}"
HOSTSFILE="${HOSTSFILE:-$HOME/.hosts}"

cleanup() {
DOWN_FLAGS=('--remove-orphans')
Expand Down Expand Up @@ -114,7 +114,7 @@ setupUserHosts() {
truncate -s 0 "${HOSTSFILE}"
for file in "${FILES[@]}" ; do
hosts="$(yq '.services.*.hostname' "${file}" | grep -v null | sed -e 's/^/localhost /')"
echo "${hosts}" >> ~/.hosts
echo "${hosts}" >> "${HOSTSFILE}"
done
}
setupUserHosts
Expand Down
4 changes: 2 additions & 2 deletions smoketest/containers/smoketest_pod.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -x
set -e

HOSTSFILE="${HOSTSFILE:-~/.hosts}"
HOSTSFILE="${HOSTSFILE:-$HOME/.hosts}"

cleanup() {
podman-compose --in-pod=1 \
Expand All @@ -30,7 +30,7 @@ cleanup
# --user=0 \
# --security-opt label=disable \
# -v "${XDG_RUNTIME_DIR}/podman/podman.sock:/tmp/docker.sock:Z" \
# -v "${HOME}/.hosts:/tmp/hosts" \
# -v "${HOSTSFILE}:/tmp/hosts" \
# dvdarias/docker-hoster

setupUserHosts() {
Expand Down

0 comments on commit c04f658

Please sign in to comment.