lib/faastruby/local/static_files/static_file.rb in faastruby-0.5.5 vs lib/faastruby/local/static_files/static_file.rb in faastruby-0.5.6

- old
+ new

@@ -2,11 +2,11 @@ module Local class StaticFile include Local::Logger def self.full_sync - cmd = "faastruby deploy-to #{Local.workspace} -f #{Local.public_dir}" + cmd = "faastruby deploy-to '#{Local.workspace}' -f '#{Local.public_dir}'" output, status = Open3.capture2e(cmd) String.disable_colorization = true if status.exitstatus == 0 output.split("\n").each {|o| puts "#{Time.now} | #{o}" unless o == '---'} puts '---' @@ -25,11 +25,11 @@ @before_build = @config['before_build'] || [] end def deploy path = "public/#{@relative_path}" - cmd = "faastruby cp #{path} #{Local.workspace}:/#{@relative_path}" + cmd = "faastruby cp '#{path}' '#{Local.workspace}:/#{@relative_path}'" puts "Running: #{cmd}" output, status = Open3.capture2e(cmd) String.disable_colorization = true if status.exitstatus == 0 output.split("\n").each {|o| puts o unless o == '---' || o == "" || o.match(/Copying file to/)} @@ -40,10 +40,10 @@ String.disable_colorization = false end def remove_from_workspace path = "public/#{@relative_path}" - cmd = "faastruby rm #{Local.workspace}:/#{@relative_path}" + cmd = "faastruby rm '#{Local.workspace}:/#{@relative_path}'" puts "Running: #{cmd}" output, status = Open3.capture2e(cmd) String.disable_colorization = true if status.exitstatus == 0 output.split("\n").each {|o| puts o unless o == '---'} \ No newline at end of file