lib/kalipso/cli.rb in kalipso-0.1.1 vs lib/kalipso/cli.rb in kalipso-0.1.2

- old
+ new

@@ -1,11 +1,11 @@ module Kalipso class CLI < Thor desc "create", "add a site" def create(name = nil) - path = File.expand_path(File.dirname($0)) + path = Dir.pwd if name.present? puts "Creating #{name} linked to #{path}" else puts "Creating a new site linked to #{path}" end @@ -69,11 +69,12 @@ desc "upload", "upload a path, eg. kalipso upload SITENAME PATH" def upload(name = nil) if name.present? puts "uploading #{name}" site = Site::Local.find_by_name(name) + path = site.path else - path = File.expand_path(File.dirname($0)) + path = File.expand_path(Dir.pwd) site = Site::Local.find_by_path(path) end if site.present? puts "uploading #{name} from #{path}" if site.path.present? \ No newline at end of file