gen-manpages: Create man directory if it does not exist
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
This commit is contained in:
		| @@ -49,6 +49,9 @@ func run() error { | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		if _, err := os.Stat(dir); os.IsNotExist(err) { | ||||
| 			os.Mkdir(dir, os.ModePerm) | ||||
| 		} | ||||
| 		if err := ioutil.WriteFile(filepath.Join(dir, fmt.Sprintf("%s.1", name)), []byte(data), 0644); err != nil { | ||||
| 			return err | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Eli Uriegas
					Eli Uriegas