OSDN Git Service
(root)
/
osdn-codes
/
osdn-cli.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6636585
)
Add error handling on conflicting with local file.
author
Tatsuki Sugiura
<sugi@nemui.org>
Fri, 25 Mar 2016 05:07:20 +0000
(14:07 +0900)
committer
Tatsuki Sugiura
<sugi@nemui.org>
Fri, 25 Mar 2016 05:07:20 +0000
(14:07 +0900)
lib/osdn/cli/command/frs_mkdirs.rb
patch
|
blob
|
history
diff --git
a/lib/osdn/cli/command/frs_mkdirs.rb
b/lib/osdn/cli/command/frs_mkdirs.rb
index
d5b8701
..
dac10d5
100644
(file)
--- a/
lib/osdn/cli/command/frs_mkdirs.rb
+++ b/
lib/osdn/cli/command/frs_mkdirs.rb
@@
-51,6
+51,10
@@
module OSDN; module CLI; module Command
end
logger.info "Making directory for release #{rname}"
rdir = pdir + rname
+ if rdir.exist? && !rdir.directory?
+ logger.error "'#{rdir}' exists but it is not a directory. Please check and delete it."
+ next
+ end
FileUtils.mkdir_p(rdir)
update_variables rdir, release_id: release.id
end