Skip to content

Allow auto-creating the output directory #154

@dmurvihill

Description

@dmurvihill

I'm trying to include the documentation in my NPM build command. I'd like to write Bluehawk output to a directory build/, which is not checked in. The Bluehawk output is an intermediate artifact that then gets picked up later in the pipeline.

Using the standard NPM workflow of git clone; npm install; npm run build, Bluehawk fails:

bluehawk snip -o build tests/
failed to write file /Users/dolan/writing/20250723_stop_throwing_errors/tests/samples.ts -> build/samples.snippet.test-snippet.ts: ENOENT: no such file or directory, open 'build/samples.snippet.test-snippet.ts'
Processed 3 files:
- 0 binary files
- 3 text files
- 1 errors
- 0 files written

To get around this problem, I have to add a mkdir command to the front of my pipeline -- it's a little inconvenient. Can I have a flag that creates the output directory if it does not exist?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions