tweak the fit of the parts
This commit is contained in:
@@ -4,18 +4,20 @@ module FeatherCaseWizard
|
||||
class ToolError < StandardError; end
|
||||
|
||||
class Toolchain
|
||||
attr_reader :openscad, :blender
|
||||
attr_reader :openscad, :blender, :python
|
||||
|
||||
def initialize(env: ENV)
|
||||
@env = env
|
||||
@openscad = discover("OPENSCAD", "openscad")
|
||||
@blender = discover("BLENDER", "blender")
|
||||
@python = discover("PYTHON", "python3")
|
||||
end
|
||||
|
||||
def check!
|
||||
missing = []
|
||||
missing << "OpenSCAD (`sudo apt-get install openscad` or set OPENSCAD)" unless openscad
|
||||
missing << "Blender (`sudo apt-get install blender` or set BLENDER)" unless blender
|
||||
missing << "Python 3 (`sudo apt-get install python3` or set PYTHON)" unless python
|
||||
return self if missing.empty?
|
||||
|
||||
raise ToolError, "Missing required tools:\n - #{missing.join("\n - ")}"
|
||||
|
||||
Reference in New Issue
Block a user