Skip to content

Commit fa0def0

Browse files
committed
Ensure spot fleet dashboard output directory exists
1 parent b9f97b9 commit fa0def0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/generate_spot_fleet_dashboard.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ def main() -> None:
5050
args = parser.parse_args()
5151

5252
dashboard = build_dashboard(args.title)
53-
Path(args.output).write_text(json.dumps(dashboard, indent=2), encoding="utf-8")
53+
output_path = Path(args.output)
54+
if output_path.parent != Path():
55+
output_path.parent.mkdir(parents=True, exist_ok=True)
56+
output_path.write_text(json.dumps(dashboard, indent=2), encoding="utf-8")
5457
print(f"Wrote {args.output}")
5558

5659

0 commit comments

Comments
 (0)