Skip to content

Commit 821475d

Browse files
committed
Copy app_template directory contents
1 parent 36d5b21 commit 821475d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

contentctl/actions/initialize.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ def execute(self, config: test) -> None:
1919

2020
if config.bare:
2121
#Create the following empty directories:
22-
for emptyDir in ['lookups', 'baselines', 'docs', 'reporting', 'investigations', 'app_template',
23-
'deployments', 'detections/application', 'detections/cloud', 'detections/endpoint',
22+
for emptyDir in ['lookups', 'baselines', 'docs', 'reporting', 'investigations', 'deployments',
23+
'detections/application', 'detections/cloud', 'detections/endpoint',
2424
'detections/network', 'detections/web', 'data_sources', 'macros', 'stories']:
2525
#Throw an error if this directory already exists
2626
(config.path/emptyDir).mkdir(exist_ok=False, parents=True)
27+
28+
# Copy the contents of the app_template directory
29+
source_directory = pathlib.Path(os.path.dirname(__file__))/'../templates/app_template/'
30+
target_directory = config.path/'app_template'
31+
shutil.copytree(source_directory, target_directory, dirs_exist_ok=False)
2732

2833
else:
2934
#Create the following empty directories:

0 commit comments

Comments
 (0)