Method: FaaStRuby::Command::Workspace::RM#run
- Defined in:
- lib/faastruby/cli/commands/workspace/rm.rb
#run ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/faastruby/cli/commands/workspace/rm.rb', line 16 def run # destination_url = "#{FaaStRuby.workspace_host_for(@workspace_name)}/#{@relative_path}" spinner = say("[#{@relative_path}] Removing file from cloud workspace '#{@workspace_name}'...") workspace = FaaStRuby::Workspace.new(name: @workspace_name) workspace.delete_file(relative_path: @relative_path) FaaStRuby::CLI.error(workspace.errors) if workspace.errors.any? spinner.success puts "* [#{@relative_path}] File removed from cloud workspace '#{@workspace_name}'.".green end |