diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-08-24 18:27:44 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-08-24 18:27:44 -0700 |
commit | 59def1b97cdfa62915737b441482b1cd391e14ef (patch) | |
tree | 69c9c5913d89d457bdb127d862a40bb51df62281 /tasks | |
parent | 437b472852e12e1334393bfe8948b3d6b7571e6c (diff) | |
download | chef-59def1b97cdfa62915737b441482b1cd391e14ef.tar.gz |
Fix spellcheck task on Windows.fix-spellcheck-task-on-windows
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/spellcheck.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tasks/spellcheck.rb b/tasks/spellcheck.rb index 7a3478c272..77b450e5d3 100644 --- a/tasks/spellcheck.rb +++ b/tasks/spellcheck.rb @@ -46,8 +46,13 @@ namespace :spellcheck do end task :cspell_check do - require "bundler" - Bundler.which("cspell") || abort(<<~INSTALL_CSPELL) + cspell_version = begin + `cspell --version` + rescue + nil + end + + cspell_version.is_a?(String) || abort(<<~INSTALL_CSPELL) cspell is needed to run the spellcheck tasks. Run `npm install -g cspell` to install. For more information: https://www.npmjs.com/package/cspell INSTALL_CSPELL |