aras-p / ClangBuildAnalyzer

Clang build analysis tool using -ftime-trace
The Unlicense
995 stars 64 forks source link

Create a folder automatically when using `--start` #81

Open Calinou opened 2 years ago

Calinou commented 2 years ago

Right now, you get an error when trying to use --start with a folder name that does not exist:

❯ clangbuildanalyzer --start artifacts
ERROR: failed to create session file at 'artifacts/ClangBuildAnalyzerSession.txt'.

Creating a folder manually solves this, but I think it should be done automatically (ideally recursively, so that it works when multiple folders need to be created):

~/Documents/Git/godotengine/godot master
❯ mkdir artifacts                                            

~/Documents/Git/godotengine/godot master
❯ clangbuildanalyzer --start artifacts
Build tracing started. Do some Clang builds with '-ftime-trace', then run 'ClangBuildAnalyzer --stop artifacts <filename>' to stop tracing and save session to a file.