Skip to content

Commit

Permalink
Don't use PWD, instead try to use PROJECT_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed Apr 9, 2018
1 parent 86ef8e2 commit 831d1a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Scripts/SwiftLint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

SWIFTLINT="$(PWD)/Pods/SwiftLint/swiftlint"
CONFIG="$(PWD)/.swiftlint.yml"
PROJECT_DIR="${PROJECT_DIR:-`cd "$(dirname $0)/..";pwd`}"
SWIFTLINT="${PROJECT_DIR}/Pods/SwiftLint/swiftlint"
CONFIG="${PROJECT_DIR}/.swiftlint.yml"

# possible paths
paths_sources="Sources"
Expand All @@ -21,4 +22,4 @@ if [ -z "$selected_path" ]; then
exit 1
fi

"$SWIFTLINT" lint --strict --config "$CONFIG" --path "${PWD}/${selected_path}"
"$SWIFTLINT" lint --strict --config "$CONFIG" --path "${PROJECT_DIR}/${selected_path}"

0 comments on commit 831d1a0

Please sign in to comment.