Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

fix: don't show docker version when daemon is not running #222

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,15 @@
"code",
"test"
]
},
{
"login": "simoarpe",
"name": "Simone Arpe",
"avatar_url": "https://avatars3.githubusercontent.com/u/3308503?v=4",
"profile": "http://sarpex.com",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7
Expand Down
38 changes: 5 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,39 +140,11 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
<table>
<tr>
<td align="center"><a href="https://twitter.com/matchai"><img src="https://avatars0.githubusercontent.com/u/4658208?v=4" width="100px;" alt="Matan Kushner"/><br /><sub><b>Matan Kushner</b></sub></a><br /><a href="https://github.com/matchai/spacefish/issues?q=author%3Amatchai" title="Bug reports">🐛</a> <a href="https://github.com/matchai/spacefish/commits?author=matchai" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=matchai" title="Documentation">📖</a> <a href="#review-matchai" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/matchai/spacefish/commits?author=matchai" title="Tests">⚠️</a> <a href="#tool-matchai" title="Tools">🔧</a> <a href="#design-matchai" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/sirMerr"><img src="https://avatars2.githubusercontent.com/u/11183523?v=4" width="100px;" alt="Tiffany Le-Nguyen"/><br /><sub><b>Tiffany Le-Nguyen</b></sub></a><br /><a href="https://github.com/matchai/spacefish/issues?q=author%3AsirMerr" title="Bug reports">🐛</a> <a href="https://github.com/matchai/spacefish/commits?author=sirMerr" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=sirMerr" title="Documentation">📖</a> <a href="#review-sirMerr" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/matchai/spacefish/commits?author=sirMerr" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/Snuggle"><img src="https://avatars0.githubusercontent.com/u/26250962?v=4" width="100px;" alt="Snuggle"/><br /><sub><b>Snuggle</b></sub></a><br /><a href="https://github.com/matchai/spacefish/issues?q=author%3ASnuggle" title="Bug reports">🐛</a> <a href="https://github.com/matchai/spacefish/commits?author=Snuggle" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=Snuggle" title="Documentation">📖</a> <a href="#review-Snuggle" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/matchai/spacefish/commits?author=Snuggle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/jskrnbindra"><img src="https://avatars2.githubusercontent.com/u/11844760?v=4" width="100px;" alt="Jaskaran Bindra"/><br /><sub><b>Jaskaran Bindra</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=jskrnbindra" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=jskrnbindra" title="Documentation">📖</a> <a href="https://github.com/matchai/spacefish/commits?author=jskrnbindra" title="Tests">⚠️</a></td>
<td align="center"><a href="https://labun.me"><img src="https://avatars3.githubusercontent.com/u/6306918?v=4" width="100px;" alt="Konstantin Labun"/><br /><sub><b>Konstantin Labun</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=kulabun" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=kulabun" title="Documentation">📖</a> <a href="https://github.com/matchai/spacefish/commits?author=kulabun" title="Tests">⚠️</a></td>
<td align="center"><a href="https://medium.com/@kyleholzinger"><img src="https://avatars0.githubusercontent.com/u/2652762?v=4" width="100px;" alt="Kyle Holzinger"/><br /><sub><b>Kyle Holzinger</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=kyleholzinger" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=kyleholzinger" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/salmanulfarzy"><img src="https://avatars0.githubusercontent.com/u/10276208?v=4" width="100px;" alt="Salmanul Farzy"/><br /><sub><b>Salmanul Farzy</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=salmanulfarzy" title="Code">💻</a> <a href="#review-salmanulfarzy" title="Reviewed Pull Requests">👀</a></td>
</tr>
<tr>
<td align="center"><a href="https://owais.lone.pw"><img src="https://avatars0.githubusercontent.com/u/46186?v=4" width="100px;" alt="owais"/><br /><sub><b>owais</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=owais" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=owais" title="Documentation">📖</a> <a href="https://github.com/matchai/spacefish/commits?author=owais" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/ladysamantha"><img src="https://avatars3.githubusercontent.com/u/35412203?v=4" width="100px;" alt="Samantha Enders"/><br /><sub><b>Samantha Enders</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=ladysamantha" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=ladysamantha" title="Documentation">📖</a> <a href="https://github.com/matchai/spacefish/commits?author=ladysamantha" title="Tests">⚠️</a></td>
<td align="center"><a href="https://evanrelf.com"><img src="https://avatars2.githubusercontent.com/u/887196?v=4" width="100px;" alt="Evan Relf"/><br /><sub><b>Evan Relf</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=evanrelf" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=evanrelf" title="Documentation">📖</a></td>
<td align="center"><a href="https://jasonet.co"><img src="https://avatars1.githubusercontent.com/u/10660468?v=4" width="100px;" alt="Jason Etcovitch"/><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=JasonEtco" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=JasonEtco" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/hrvoj3e"><img src="https://avatars0.githubusercontent.com/u/4988133?v=4" width="100px;" alt="hrvoj3e"/><br /><sub><b>hrvoj3e</b></sub></a><br /><a href="https://github.com/matchai/spacefish/issues?q=author%3Ahrvoj3e" title="Bug reports">🐛</a> <a href="https://github.com/matchai/spacefish/commits?author=hrvoj3e" title="Code">💻</a></td>
<td align="center"><a href="http://newmaniese.com"><img src="https://avatars1.githubusercontent.com/u/64894?v=4" width="100px;" alt="Michael Newman"/><br /><sub><b>Michael Newman</b></sub></a><br /><a href="https://github.com/matchai/spacefish/issues?q=author%3Anewmaniese" title="Bug reports">🐛</a> <a href="https://github.com/matchai/spacefish/commits?author=newmaniese" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=newmaniese" title="Documentation">📖</a> <a href="https://github.com/matchai/spacefish/commits?author=newmaniese" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/k-lyda"><img src="https://avatars0.githubusercontent.com/u/6491400?v=4" width="100px;" alt="Konrad"/><br /><sub><b>Konrad</b></sub></a><br /><a href="https://github.com/matchai/spacefish/issues?q=author%3Ak-lyda" title="Bug reports">🐛</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/dubnev"><img src="https://avatars1.githubusercontent.com/u/3227558?v=4" width="100px;" alt="Will Neville"/><br /><sub><b>Will Neville</b></sub></a><br /><a href="https://github.com/matchai/spacefish/issues?q=author%3Adubnev" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/danieltrautmann"><img src="https://avatars1.githubusercontent.com/u/4022138?v=4" width="100px;" alt="Daniel Trautmann"/><br /><sub><b>Daniel Trautmann</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=danieltrautmann" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Menturan"><img src="https://avatars0.githubusercontent.com/u/16061385?v=4" width="100px;" alt="Jonas Öhlander"/><br /><sub><b>Jonas Öhlander</b></sub></a><br /><a href="https://github.com/matchai/spacefish/issues?q=author%3AMenturan" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://twitter.com/lynzt"><img src="https://avatars1.githubusercontent.com/u/3099491?v=4" width="100px;" alt="lindsay"/><br /><sub><b>lindsay</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=lynzt" title="Documentation">📖</a></td>
<td align="center"><a href="http://www.bradcypert.com"><img src="https://avatars0.githubusercontent.com/u/1455979?v=4" width="100px;" alt="Brad"/><br /><sub><b>Brad</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=bradcypert" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/nammn"><img src="https://avatars3.githubusercontent.com/u/23652004?v=4" width="100px;" alt="Nam Nguyen"/><br /><sub><b>Nam Nguyen</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=nammn" title="Code">💻</a></td>
<td align="center"><a href="http://www.halostatue.ca/"><img src="https://avatars3.githubusercontent.com/u/11361?v=4" width="100px;" alt="Austin Ziegler"/><br /><sub><b>Austin Ziegler</b></sub></a><br /><a href="#review-halostatue" title="Reviewed Pull Requests">👀</a></td>
</tr>
<tr>
<td align="center"><a href="http://kouk.surukle.me"><img src="https://avatars1.githubusercontent.com/u/456007?v=4" width="100px;" alt="Konstantinos Koukopoulos"/><br /><sub><b>Konstantinos Koukopoulos</b></sub></a><br /><a href="https://github.com/matchai/spacefish/commits?author=kouk" title="Code">💻</a> <a href="https://github.com/matchai/spacefish/commits?author=kouk" title="Tests">⚠️</a></td>
</tr>
</table>

| [<img src="https://avatars0.githubusercontent.com/u/4658208?v=4" width="100px;"/><br /><sub><b>Matan Kushner</b></sub>](https://twitter.com/matchai)<br />[🐛](https://github.com/matchai/spacefish/issues?q=author%3Amatchai "Bug reports") [💻](https://github.com/matchai/spacefish/commits?author=matchai "Code") [📖](https://github.com/matchai/spacefish/commits?author=matchai "Documentation") [👀](#review-matchai "Reviewed Pull Requests") [⚠️](https://github.com/matchai/spacefish/commits?author=matchai "Tests") [🔧](#tool-matchai "Tools") [🎨](#design-matchai "Design") | [<img src="https://avatars2.githubusercontent.com/u/11183523?v=4" width="100px;"/><br /><sub><b>Tiffany Le-Nguyen</b></sub>](https://github.com/sirMerr)<br />[🐛](https://github.com/matchai/spacefish/issues?q=author%3AsirMerr "Bug reports") [💻](https://github.com/matchai/spacefish/commits?author=sirMerr "Code") [📖](https://github.com/matchai/spacefish/commits?author=sirMerr "Documentation") [👀](#review-sirMerr "Reviewed Pull Requests") [⚠️](https://github.com/matchai/spacefish/commits?author=sirMerr "Tests") | [<img src="https://avatars0.githubusercontent.com/u/26250962?v=4" width="100px;"/><br /><sub><b>Snuggle</b></sub>](https://github.com/Snuggle)<br />[🐛](https://github.com/matchai/spacefish/issues?q=author%3ASnuggle "Bug reports") [💻](https://github.com/matchai/spacefish/commits?author=Snuggle "Code") [📖](https://github.com/matchai/spacefish/commits?author=Snuggle "Documentation") [👀](#review-Snuggle "Reviewed Pull Requests") [⚠️](https://github.com/matchai/spacefish/commits?author=Snuggle "Tests") | [<img src="https://avatars2.githubusercontent.com/u/11844760?v=4" width="100px;"/><br /><sub><b>Jaskaran Bindra</b></sub>](https://github.com/jskrnbindra)<br />[💻](https://github.com/matchai/spacefish/commits?author=jskrnbindra "Code") [📖](https://github.com/matchai/spacefish/commits?author=jskrnbindra "Documentation") [⚠️](https://github.com/matchai/spacefish/commits?author=jskrnbindra "Tests") | [<img src="https://avatars3.githubusercontent.com/u/6306918?v=4" width="100px;"/><br /><sub><b>Konstantin Labun</b></sub>](https://labun.me)<br />[💻](https://github.com/matchai/spacefish/commits?author=kulabun "Code") [📖](https://github.com/matchai/spacefish/commits?author=kulabun "Documentation") [⚠️](https://github.com/matchai/spacefish/commits?author=kulabun "Tests") | [<img src="https://avatars0.githubusercontent.com/u/2652762?v=4" width="100px;"/><br /><sub><b>Kyle Holzinger</b></sub>](https://medium.com/@kyleholzinger)<br />[💻](https://github.com/matchai/spacefish/commits?author=kyleholzinger "Code") [📖](https://github.com/matchai/spacefish/commits?author=kyleholzinger "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/10276208?v=4" width="100px;"/><br /><sub><b>Salmanul Farzy</b></sub>](https://github.com/salmanulfarzy)<br />[💻](https://github.com/matchai/spacefish/commits?author=salmanulfarzy "Code") [👀](#review-salmanulfarzy "Reviewed Pull Requests") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars0.githubusercontent.com/u/46186?v=4" width="100px;"/><br /><sub><b>owais</b></sub>](https://owais.lone.pw)<br />[💻](https://github.com/matchai/spacefish/commits?author=owais "Code") [📖](https://github.com/matchai/spacefish/commits?author=owais "Documentation") [⚠️](https://github.com/matchai/spacefish/commits?author=owais "Tests") | [<img src="https://avatars3.githubusercontent.com/u/35412203?v=4" width="100px;"/><br /><sub><b>Samantha Enders</b></sub>](https://github.com/ladysamantha)<br />[💻](https://github.com/matchai/spacefish/commits?author=ladysamantha "Code") [📖](https://github.com/matchai/spacefish/commits?author=ladysamantha "Documentation") [⚠️](https://github.com/matchai/spacefish/commits?author=ladysamantha "Tests") | [<img src="https://avatars2.githubusercontent.com/u/887196?v=4" width="100px;"/><br /><sub><b>Evan Relf</b></sub>](https://evanrelf.com)<br />[💻](https://github.com/matchai/spacefish/commits?author=evanrelf "Code") [📖](https://github.com/matchai/spacefish/commits?author=evanrelf "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/10660468?v=4" width="100px;"/><br /><sub><b>Jason Etcovitch</b></sub>](https://jasonet.co)<br />[💻](https://github.com/matchai/spacefish/commits?author=JasonEtco "Code") [📖](https://github.com/matchai/spacefish/commits?author=JasonEtco "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/4988133?v=4" width="100px;"/><br /><sub><b>hrvoj3e</b></sub>](https://github.com/hrvoj3e)<br />[🐛](https://github.com/matchai/spacefish/issues?q=author%3Ahrvoj3e "Bug reports") [💻](https://github.com/matchai/spacefish/commits?author=hrvoj3e "Code") | [<img src="https://avatars1.githubusercontent.com/u/64894?v=4" width="100px;"/><br /><sub><b>Michael Newman</b></sub>](http://newmaniese.com)<br />[🐛](https://github.com/matchai/spacefish/issues?q=author%3Anewmaniese "Bug reports") [💻](https://github.com/matchai/spacefish/commits?author=newmaniese "Code") [📖](https://github.com/matchai/spacefish/commits?author=newmaniese "Documentation") [⚠️](https://github.com/matchai/spacefish/commits?author=newmaniese "Tests") | [<img src="https://avatars0.githubusercontent.com/u/6491400?v=4" width="100px;"/><br /><sub><b>Konrad</b></sub>](https://github.com/k-lyda)<br />[🐛](https://github.com/matchai/spacefish/issues?q=author%3Ak-lyda "Bug reports") |
| [<img src="https://avatars1.githubusercontent.com/u/3227558?v=4" width="100px;"/><br /><sub><b>Will Neville</b></sub>](https://github.com/dubnev)<br />[🐛](https://github.com/matchai/spacefish/issues?q=author%3Adubnev "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/4022138?v=4" width="100px;"/><br /><sub><b>Daniel Trautmann</b></sub>](https://github.com/danieltrautmann)<br />[💻](https://github.com/matchai/spacefish/commits?author=danieltrautmann "Code") | [<img src="https://avatars0.githubusercontent.com/u/16061385?v=4" width="100px;"/><br /><sub><b>Jonas Öhlander</b></sub>](https://github.com/Menturan)<br />[🐛](https://github.com/matchai/spacefish/issues?q=author%3AMenturan "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/3099491?v=4" width="100px;"/><br /><sub><b>lindsay</b></sub>](https://twitter.com/lynzt)<br />[📖](https://github.com/matchai/spacefish/commits?author=lynzt "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/1455979?v=4" width="100px;"/><br /><sub><b>Brad</b></sub>](http://www.bradcypert.com)<br />[💻](https://github.com/matchai/spacefish/commits?author=bradcypert "Code") | [<img src="https://avatars3.githubusercontent.com/u/23652004?v=4" width="100px;"/><br /><sub><b>Nam Nguyen</b></sub>](https://github.com/nammn)<br />[💻](https://github.com/matchai/spacefish/commits?author=nammn "Code") | [<img src="https://avatars3.githubusercontent.com/u/11361?v=4" width="100px;"/><br /><sub><b>Austin Ziegler</b></sub>](http://www.halostatue.ca/)<br />[👀](#review-halostatue "Reviewed Pull Requests") |
| [<img src="https://avatars1.githubusercontent.com/u/456007?v=4" width="100px;"/><br /><sub><b>Konstantinos Koukopoulos</b></sub>](http://kouk.surukle.me)<br />[💻](https://github.com/matchai/spacefish/commits?author=kouk "Code") [⚠️](https://github.com/matchai/spacefish/commits?author=kouk "Tests") | [<img src="https://avatars3.githubusercontent.com/u/3308503?v=4" width="100px;"/><br /><sub><b>Simone Arpe</b></sub>](http://sarpex.com)<br />[💻](https://github.com/matchai/spacefish/commits?author=simoarpe "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
Expand Down
12 changes: 12 additions & 0 deletions functions/__sf_section_docker.fish
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ function __sf_section_docker -d "Display docker version and machine name"
return
end

# Check if docker is running
if ! docker info >/dev/null 2>&1
# docker daemon is not running, don't show the version
__sf_lib_section \
$SPACEFISH_DOCKER_COLOR \
$SPACEFISH_DOCKER_PREFIX \
"$SPACEFISH_DOCKER_SYMBOL" \
$SPACEFISH_DOCKER_SUFFIX
return
end


set -l docker_version (docker version -f "{{.Server.Version}}" 2>/dev/null)
# if docker daemon isn't running you'll get an error like 'Bad response from Docker engine'
[ -z $docker_version ]; and return
Expand Down