Skip to content

Commit

Permalink
fix results_path check
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonsanjose committed Oct 26, 2012
1 parent ef761b8 commit 32dd3e1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tools/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if [[ ${1} == "" ]]; then
exit;
fi

# Check for Brackets.exe file on windows, Brackets.app directory on mac
if [[ "$OSTYPE" == "msys"* && ! -f "${1}" ]]; then
echo "$1 not found."
exit;
Expand All @@ -21,15 +22,15 @@ elif [[ "$OSTYPE" == "darwin"* && ! -d "${1}" ]]; then
fi

# JSON results file path
# TODO check file exists
results_path="${PWD}/results.json"
if [[ ${2} != "" ]]; then
if [[ -f "${2}" ]]; then
echo "File $2 already exists. Choose another results JSON file destination."
exit;
else
results_path="${2}"
fi
results_path="${2}"
fi

# Check if results.json file already exists
if [[ -f "${results_path}" ]]; then
echo "File $results_path already exists. Choose another results JSON file destination."
exit;
fi

# Spec name filter
Expand Down

0 comments on commit 32dd3e1

Please sign in to comment.