Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Create directory on output #4268

Closed
atdiff opened this issue Nov 5, 2018 · 0 comments · Fixed by #4507
Closed

Create directory on output #4268

atdiff opened this issue Nov 5, 2018 · 0 comments · Fixed by #4507

Comments

@atdiff
Copy link

atdiff commented Nov 5, 2018

Bug Report

When output the linting results to a file in a non-existent directory, an error occurs running this command:
tslint src/**/*.ts -t json -o newDirectory/results.json

  • TSLint version: 5.11.0
  • TypeScript version: 2.9.2
  • Running TSLint via: CLI

Actual behavior

The following error occurs:

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open 'C:\newDirectory\results.json'
Emitted 'error' event at:
    at lazyFs.open (internal/fs/streams.js:273:12)
    at FSReqWrap.oncomplete (fs.js:141:20)

Expected behavior

I would expect the directory to be created automatically

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants