This repository was archived by the owner on Jan 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -123,21 +123,22 @@ so it does not conflict with any other Cloud Code in the current directory.
123123
124124 cloudCodeDirInfo , err := os .Stat (filepath .Join (e .Root , cloudCodeDir ))
125125 if err == nil {
126- if ! cloudCodeDirInfo .IsDir () {
127- return "" , stackerr .Newf (`Sorry, we are unable to create Cloud Code at %s.
128- In the current directory a file named: %s already exists.
126+ fileType := "file"
127+ if cloudCodeDirInfo .IsDir () {
128+ fileType = "directory"
129+ }
130+ return "" , stackerr .Newf (`Sorry, we are unable to create Cloud Code at %s.
131+ In the current directory a %s named: %q already exists.
129132Please run "parse new" again.
130133%s
131134Please choose a different name for your Cloud Code directory,
132135so it does not conflict with any other Cloud Code in the current directory.
133136` ,
134- cloudCodeDir ,
135- cloudCodeDir ,
136- helpMsg ,
137- )
138-
139- }
140- return "" , nil
137+ cloudCodeDir ,
138+ fileType ,
139+ cloudCodeDir ,
140+ helpMsg ,
141+ )
141142 }
142143 if ! os .IsNotExist (err ) {
143144 return "" , stackerr .Wrap (err )
You can’t perform that action at this time.
0 commit comments