Skip to content

Commit 20b185c

Browse files
Merge pull request #5 from designatednerd/master
Fix unquoted paths.
2 parents d46e758 + 848eb29 commit 20b185c

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

XcodeCoverage.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'XcodeCoverage'
33
spec.summary = 'Code coverage for Xcode projects'
4-
spec.version = '1.0.1'
4+
spec.version = '1.0.2'
55
spec.platform = :ios
66
spec.ios.deployment_target = '6.0'
77
spec.authors = {'Jon Reid' => '[email protected]'}

envcov.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
#
23
# Copyright 2014 Jonathan M. Reid. See LICENSE.txt
34
# Created by: Jon Reid, http://qualitycoding.org/
@@ -7,35 +8,35 @@
78
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
89
ENV_DIR="${DIR}"
910

10-
if [[ $DIR == *Pods/XcodeCoverage* ]]
11+
if [[ "$DIR" == *Pods/XcodeCoverage* ]]
1112
then
1213
echo "Using Cocoapods!"
13-
cd ${DIR}
14+
cd "${DIR}"
1415
cd ..
1516
cd ..
1617

1718
#The env.sh file will be in the project root.
1819
ENV_DIR="$(pwd)"
1920
fi
2021

21-
source ${ENV_DIR}/env.sh
22+
source "${ENV_DIR}/env.sh"
2223

2324
# Change the report name if you like:
2425
LCOV_INFO=Coverage.info
2526

2627
XCODECOVERAGE_PATH="${SRCROOT}/XcodeCoverage"
2728

28-
if [[ $DIR == *Pods/XcodeCoverage* ]]
29+
if [[ "$DIR" == *Pods/XcodeCoverage* ]]
2930
then
3031
echo "Using Cocoapods!"
3132
#The current directory will be where XcodeCoverage is living, not in SRCROOT
3233
XCODECOVERAGE_PATH="${DIR}"
3334
fi
3435

3536
LCOV_PATH="${XCODECOVERAGE_PATH}/lcov-1.11/bin"
36-
OBJ_DIR=${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}
37+
OBJ_DIR="${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}"
3738

3839
# Fix for the new LLVM-COV that requires gcov to have a -v paramter
3940
LCOV() {
40-
${LCOV_PATH}/lcov "$@" --gcov-tool ${XCODECOVERAGE_PATH}/llvm-cov-wrapper.sh
41+
"${LCOV_PATH}/lcov" "$@" --gcov-tool "${XCODECOVERAGE_PATH}/llvm-cov-wrapper.sh"
4142
}

getcov

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77

88
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
9-
source ${DIR}/envcov.sh
9+
source "${DIR}/envcov.sh"
1010

1111
remove_old_report()
1212
{

lcov-1.11/bin/geninfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ sub get_gcov_version()
18981898
my $version_string;
18991899
my $result;
19001900

1901-
open(GCOV_PIPE, "-|", "$gcov_tool --version")
1901+
open(GCOV_PIPE, "-|", "\"$gcov_tool\" --version")
19021902
or die("ERROR: cannot retrieve gcov version!\n");
19031903
$version_string = <GCOV_PIPE>;
19041904
# LLVM gcov keeps version information on the second line.

0 commit comments

Comments
 (0)