Skip to content

Commit

Permalink
Fix for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ko1nksm committed Mar 20, 2020
1 parent fe10b3c commit 7ebeb3c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
21 changes: 16 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
language: sh
language: shell
os: linux
dist: bionic
services:
- docker
addons:
apt:
update: true
packages: bash mksh yash zsh shellcheck
homebrew:
update: true
packages: shellcheck
jobs:
include:
- os: linux
dist: bionic
env: COVERAGE=1
services:
- docker
- os: osx
osx_image: xcode11.3
before_install:
- sudo apt-get install -y bash mksh yash zsh
- curl -fsSL https://git.io/shellspec | sh -s master -y
script:
- make test
- make check
- make coveralls
- if [ "$COVERAGE" ]; then make coveralls; fi
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
all: test check

test:
shellspec -s bash --no-quick
shellspec -s zsh --no-quick
shellspec -s mksh --no-quick
shellspec -s yash --no-quick
if type bash; then shellspec -s bash --no-quick; fi
if type zsh; then shellspec -s zsh --no-quick; fi
if type mksh; then shellspec -s mksh --no-quick; fi
if type yash; then shellspec -s yash --no-quick; fi

check:
shellcheck shellmetrics spec/shellmetrics_spec.sh
Expand Down
3 changes: 2 additions & 1 deletion shellmetrics
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ pretty() {
while [ "$i" -gt 0 ] && i=$((i - 1)); do
echo '}'
done
echo "typeset -fp shellmetrics_wrapper"
echo "typeset -fp shellmetrics_wrapper 2>/dev/null" \
"|| typeset -f shellmetrics_wrapper"
}

process() {
Expand Down

0 comments on commit 7ebeb3c

Please sign in to comment.