We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fbbdce commit 50b6642Copy full SHA for 50b6642
lib/matrixeval/ruby/config/yaml.rb
@@ -2,6 +2,9 @@ module Matrixeval
2
module Ruby
3
class Config
4
class YAML
5
+
6
+ class MissingError < StandardError; end
7
8
class << self
9
10
def create
@@ -25,6 +28,8 @@ def [](key)
25
28
end
26
29
27
30
def yaml
31
+ raise MissingError unless File.exist?(path)
32
33
::YAML.load File.read(path)
34
35
lib/matrixeval/ruby/runner.rb
@@ -38,6 +38,9 @@ def start
38
See 'matrixeval --help'
39
ERROR
40
exit
41
+ rescue Config::YAML::MissingError
42
+ puts "Please run 'matrixeval init' first to generate matrixeval.yml"
43
+ exit
44
ensure
45
turn_on_stty_opost
46
0 commit comments