Update the install_command function so it works when invoked in directory whose name contains whitespace.

This commit is contained in:
Stratus3D 2016-10-25 18:13:13 -04:00
parent 60a62321d8
commit 1360010723
2 changed files with 6 additions and 3 deletions

View File

@ -22,8 +22,8 @@ get_concurrency() {
}
install_local_tool_versions() {
if [ -f $(pwd)/.tool-versions ]; then
local asdf_versions_path=$(pwd)/.tool-versions
if [ -f "$(pwd)/.tool-versions" ]; then
local asdf_versions_path="$(pwd)/.tool-versions"
while read tool_line; do
IFS=' ' read -a tool_info <<< $tool_line
@ -33,7 +33,7 @@ install_local_tool_versions() {
if ! [[ -z "$tool_name" || -z "$tool_version" ]]; then
install_tool_version $tool_name $tool_version
fi
done < $asdf_versions_path
done < "$asdf_versions_path"
else
echo "Either specify a tool & version in the command"
echo "OR add .tool-versions file in this directory"

View File

@ -8,6 +8,9 @@ load test_helpers
setup() {
setup_asdf_dir
install_dummy_plugin
PROJECT_DIR=$HOME/project
mkdir $PROJECT_DIR
}
teardown() {