Skip to content

Commit 8f8fa1d

Browse files
committedJun 30, 2023
feat: No output if a file with the same name exists at the deploy destination.
1 parent fb9f516 commit 8f8fa1d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎exe/runa

+7-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,13 @@ class RunaCli < Thor
6060
deploy_load_path_script
6161
path = File.join(deploy_path, deploy_script_name)
6262
path += ".bat" if OS.windows?
63-
File.write(path, deploy_script(root_dir, script_file))
64-
puts "Deploy execution script to '#{path}'."
63+
if !File.exist?(path)
64+
File.write(path, deploy_script(root_dir, script_file))
65+
puts "Deploy execution script to '#{path}'."
66+
else
67+
puts "Error: '#{path}' is already exists."
68+
exit(1)
69+
end
6570
end
6671

6772
private

0 commit comments

Comments
 (0)
Please sign in to comment.