Skip to content

Allow escaping vars in .env #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ HOST_IP=host.docker.internal

# Uncomment and change the following to a full path on your host
# If not specified tdb will use the folder "tdb_backup" in your home directory
#TDB_BACKUP_PATH=/your/path/to/backup/location
#TDB_BACKUP_PATH="/your/path/to/backup/location"

# Set your preferred shell (used by things like tphp). bash and zsh are available.
INTERACTIVE_SHELL=zsh
Expand Down
2 changes: 1 addition & 1 deletion bin/tdb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Standard boilerplate code for getting the paths and environment variables we need.
script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"
export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a
sub_path="${PWD//$LOCAL_SRC/}"
remote_path="$REMOTE_SRC/$sub_path"
local_path="$LOCAL_SRC/$sub_path"
Expand Down
2 changes: 1 addition & 1 deletion bin/tdocker
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"
export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a

cd $project_path;

Expand Down
2 changes: 1 addition & 1 deletion bin/tdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"

export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a

$script_path/tdocker down

Expand Down
2 changes: 1 addition & 1 deletion bin/texec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Standard boilerplate code for getting the paths and environment variables we need.
script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"
export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a
sub_path="${PWD//$LOCAL_SRC/}"
remote_path="$REMOTE_SRC/$sub_path"
local_path="$LOCAL_SRC/$sub_path"
Expand Down
2 changes: 1 addition & 1 deletion bin/tgrunt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Standard boilerplate code for getting the paths and environment variables we need.
script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"
export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a
sub_path="${PWD//$LOCAL_SRC/}"
remote_path="$REMOTE_SRC/$sub_path"

Expand Down
2 changes: 1 addition & 1 deletion bin/tngrok
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project_path="$( cd $script_path && cd ..; pwd -P )"

source "$project_path/tools/check_for_update.sh"

export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a

if [[ -z "$*" ]]; then
echo "Helper for using ngrok with your totara site.
Expand Down
2 changes: 1 addition & 1 deletion bin/tnpm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Standard boilerplate code for getting the paths and environment variables we need.
script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"
export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a
sub_path="${PWD//$LOCAL_SRC/}"
remote_path="$REMOTE_SRC/$sub_path"

Expand Down
2 changes: 1 addition & 1 deletion bin/tphp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Standard boilerplate code for getting the paths and environment variables we need.
script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"
export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a

if [[ -z "$1" ]]; then
$script_path/texec php "${INTERACTIVE_SHELL:-zsh}"
Expand Down
2 changes: 1 addition & 1 deletion bin/tup
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Standard boilerplate code for getting the paths and environment variables we need.
script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"
export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a
sub_path="${PWD//$LOCAL_SRC/}"
local_path="$LOCAL_SRC/$sub_path"

Expand Down
2 changes: 1 addition & 1 deletion bin/tyarn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Standard boilerplate code for getting the paths and environment variables we need.
script_path="$( cd "$(dirname "$0")" ; pwd -P )"
project_path="$( cd $script_path && cd ..; pwd -P )"
export $(grep -E -v '^#' $project_path/.env | xargs)
set -a; source "$project_path/.env"; set +a
sub_path="${PWD//$LOCAL_SRC/}"
remote_path="$REMOTE_SRC/$sub_path"

Expand Down
2 changes: 1 addition & 1 deletion tools/check_for_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if [[ -z "$LOCAL_SRC" ]]; then
script_path=$( cd "$(dirname "$0")" || exit; pwd -P )
project_path=$( cd "$script_path" && cd ..; pwd -P )
export $(grep -E -v '^#' "$project_path/.env" | xargs)
set -a; source "$project_path/.env"; set +a
fi

# We don't want to update it if:
Expand Down
2 changes: 1 addition & 1 deletion tools/set_hosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

script_path=$( cd "$(dirname $0)" || exit; pwd -P )
project_path=$( cd "$script_path" && cd ..; pwd -P )
export $(grep -E -v '^#' "$project_path/.env" | xargs)
set -a; source "$project_path/.env"; set +a

# If this is being run inside WSL, then we need to modify the /etc/hosts file on Windows
if [[ -f "/mnt/c/Windows/System32/drivers/etc/hosts" ]]; then
Expand Down