summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-08-24 22:04:09 -0700
committerGitHub <noreply@github.com>2020-08-24 22:04:09 -0700
commit894e9d4bf863d307c0090476df2ff551a9856fb9 (patch)
tree2aa56ff0197fc74f8d50e0c149a66c2595309605
parent650291fa06de1daac528af8b99ca84c6e2fdb1b3 (diff)
parent59def1b97cdfa62915737b441482b1cd391e14ef (diff)
downloadchef-894e9d4bf863d307c0090476df2ff551a9856fb9.tar.gz
Merge pull request #10344 from chef/fix-spellcheck-task-on-windows
Fix spellcheck task on Windows.
-rw-r--r--tasks/spellcheck.rb9
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