Skip to content

Commit fa3c053

Browse files
patch root readme indendation issue (#19)
* DEVOPS-304 azure container registry terraform module * fixing root readme shift a space right for vmss linux folder and files
1 parent e7b0adc commit fa3c053

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

create-readme.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
2-
#!/bin/bash
3-
1+
#! /bin/bash
42
# Ensure the 'tree' command is installed
53
if ! command -v tree &> /dev/null; then
64
echo "'tree' command not found. Please install it to use this script."
@@ -45,9 +43,12 @@ echo '## Project Directory Structure' >> "$readme_file"
4543
echo '```' >> "$readme_file"
4644

4745
# Generate the directory structure and append to README.md, ignoring certain files
48-
tree -I 'LICENSE|create-readme.sh|.github|.git' --charset utf-8 >> "$readme_file"
49-
50-
# End the Markdown code block
46+
IGNORED_FILES="LICENSE|create-readme.sh|.github|.git"
47+
if ! tree_output=$(tree -I "$IGNORED_FILES" -n --dirsfirst --charset utf-8 2>/dev/null); then
48+
echo "Error: Failed to generate directory structure."
49+
exit 1
50+
fi
51+
echo "$tree_output" >> "$readme_file"
5152
echo '```' >> "$readme_file"
5253

5354
# Print success message

0 commit comments

Comments
 (0)