summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorRyan Punt <ryan@mirum.org>2021-10-25 21:59:11 -0500
committerRyan Punt <ryan@mirum.org>2021-10-25 21:59:11 -0500
commit6b0ab0aaa81147e4cea9ede2559ce3e5343082e9 (patch)
treed0cec1538c5730f3f28865c816cb07be7ea47479 /tasks
parent05986bd3460175a821999701b43d40c7c705e491 (diff)
downloadchef-6b0ab0aaa81147e4cea9ede2559ce3e5343082e9.tar.gz
spellcheck task requires wget; ensure it's installed
Signed-off-by: Ryan Punt <ryan@mirum.org>
Diffstat (limited to 'tasks')
-rw-r--r--tasks/spellcheck.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/tasks/spellcheck.rb b/tasks/spellcheck.rb
index 0eb8924a81..a3ffb577d7 100644
--- a/tasks/spellcheck.rb
+++ b/tasks/spellcheck.rb
@@ -20,7 +20,19 @@ namespace :spellcheck do
sh 'cspell lint --no-progress "**/*"'
end
- task prereqs: %i{cspell_check config_check fetch_common}
+ task prereqs: %i{wget_check cspell_check config_check fetch_common}
+
+ task :wget_check do
+ wget_version = begin
+ `wget --version`
+ rescue
+ nil
+ end
+
+ wget_version.is_a?(String) || abort(<<~INSTALL_WGET)
+ wget is not installed
+ INSTALL_WGET
+ end
task :fetch_common do
sh "wget -q https://raw.githubusercontent.com/chef/chef_dictionary/master/chef.txt -O chef_dictionary.txt"