File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ func main() {
192
192
}
193
193
194
194
// Initialize output directory
195
+ if _ , err := os .Stat (flagOutputDir ); os .IsNotExist (err ) {
196
+ if err := os .MkdirAll (flagOutputDir , 0750 ); err != nil {
197
+ return fmt .Errorf ("creating output directory %q: %v" , flagOutputDir , err )
198
+ }
199
+ }
195
200
empty , err := utils .DirIsEmpty (flagOutputDir )
196
201
if err != nil {
197
202
return fmt .Errorf ("failed to check emptiness of output directory %q: %v" , flagOutputDir , err )
@@ -266,7 +271,7 @@ The output directory is not empty. Please choose one of actions below:
266
271
Name : "output-dir" ,
267
272
EnvVars : []string {"AZTFY_OUTPUT_DIR" },
268
273
Aliases : []string {"o" },
269
- Usage : "The output directory" ,
274
+ Usage : "The output directory (will create if not exists) " ,
270
275
Value : func () string {
271
276
dir , _ := os .Getwd ()
272
277
return dir
You can’t perform that action at this time.
0 commit comments