question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Output dir not created when is a nested directory

See original GitHub issue

Hi,

When setting up the output directory as subdirectory of a non-existing directory, the application is not creating the tree before trying to save the screenshots:

Example: "output": "./reports/integration/screenshots",

Should create reports, reports/integration/, reports/integration/screenshots if those doesn’t exists.

At the moment the reporter is outputting this: Uncaught ENOENT: no such file or directory, open [screenshotFile] Where [screenshotFile] is the path to the screenshot.

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Nighthawk14commented, Aug 4, 2016

Hey, Thing is basic reporters for Mocha / Karma or Protractor (screenshot / failures ) creates folders recursively if they don’t exists then write the reports into, so that would be more consistent with the rest of the common tools present in the community. I agree that at least checking if the folders exists is a must to have if you want to keep the current strategy 😃.

0reactions
APshenkincommented, Jul 25, 2017

Closing this issue. In 1.0.0 there is no problems to create output directories recursive

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I safely create a nested directory? - Stack Overflow
Try os.path.exists , and consider os.makedirs for the creation. import os if not os.
Read more >
Output dir not created when is a nested directory #168 - GitHub
Hi, When setting up the output directory as subdirectory of a non-existing directory, the application is not creating the tree before trying ...
Read more >
How can I create a directory if it does not exist using Python?
In Python, use the os.path.exists() method to see if a directory already exists, and then use the os.makedirs() method to create it.
Read more >
How to Create Directory If it Does Not Exist using Python?
In this method, we will use isdir() method takes path of demo_folder2 as an argument and returns true if the directory exists and...
Read more >
How to Make Nested Directories in Linux Command Line
Learn to make nested directories so that if a directory in the given path doesn't exist, it is created automatically.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found