File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/rai_whoami/rai_whoami Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 23
23
]
24
24
25
25
26
- def initialize_docs_directory (args : argparse .Namespace ) -> None :
27
- documentation_dir = Path (args .documentation_dir )
28
- if os .path .exists (documentation_dir ):
26
+ def initialize_docs_directory (documentation_dir : Path ) -> None :
27
+ if documentation_dir .is_dir ():
29
28
print (
30
29
f"Directory { documentation_dir } already exists. Remove it or use different folder."
31
30
)
32
31
return
33
32
34
- os .makedirs (documentation_dir )
35
- print (f"Initialized documentation directory at { documentation_dir } " )
36
33
for subdirectory in SUBDIRECTORIES :
37
- os . makedirs (documentation_dir / subdirectory )
34
+ (documentation_dir / subdirectory ). mkdir ( parents = True )
38
35
print (
39
36
f"Initialized subdirectory { subdirectory } at { documentation_dir / subdirectory } "
40
37
)
You can’t perform that action at this time.
0 commit comments