We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e737547 commit ec64e11Copy full SHA for ec64e11
.github/workflows/substack_blogs.yml
@@ -275,9 +275,18 @@ jobs:
275
end_marker: The marker indicating the end of the section to update.
276
"""
277
try:
278
+ # Validate inputs
279
+ if not filename or not isinstance(filename, str):
280
+ print(f"Invalid filename: '{filename}'")
281
+ return False
282
+
283
+ print(f"Attempting to update file: '{filename}'")
284
285
# Make sure the directory exists
286
import os
- os.makedirs(os.path.dirname(filename), exist_ok=True)
287
+ dir_name = os.path.dirname(filename)
288
+ if dir_name: # Only try to create directory if there is one
289
+ os.makedirs(dir_name, exist_ok=True)
290
291
# Check if file exists, if not create it with initial content
292
if not os.path.exists(filename):
0 commit comments