diff --git a/bin/noprocast b/bin/noprocast index f549de7..2a3489a 100644 --- a/bin/noprocast +++ b/bin/noprocast @@ -11,7 +11,7 @@ begin when 'status' puts Noprocast.status_message when 'edit' - if Process.uid != File.stat(Noprocast.deny_file_path).uid + if File.exists?(Noprocast.deny_file_path) && (Process.uid != File.stat(Noprocast.deny_file_path).uid) puts "Can't edit this file as it belongs to another user (hint: don't use sudo)" exit end diff --git a/noprocast.gemspec b/noprocast.gemspec index 50acd4c..2a7aa86 100644 --- a/noprocast.gemspec +++ b/noprocast.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = %q{noprocast} - s.version = "0.1.0" + s.version = "0.1.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Rob Watson"]