Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADO Extension should support nested directories for outputDir #1609

Closed
JGibson2019 opened this issue Mar 28, 2023 · 0 comments · Fixed by #1647
Closed

ADO Extension should support nested directories for outputDir #1609

JGibson2019 opened this issue Mar 28, 2023 · 0 comments · Fixed by #1647
Assignees
Labels
bug Something isn't working status: resolved This issue has been merged into main and deployed to canary.

Comments

@JGibson2019
Copy link
Contributor

Describe the bug

If users pass a nested directory (e.g. "$(DefaultDirectoryPath)\parent\child')" to outputDir, and the parent directory doesn't exist yet, the extension should be able to create the parent directory and not throw an exception. Currently, the extension expects to be sent single layer/non-nested throws an error when expected to write to a parent directory that does not already exist.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to the yaml file
  2. Go to inputs
  3. Go to outputDir and specify '$(DefaultDirectoryPath)\parent\child'
  4. Try to build and receive the error "##[error][Exception]ErrorWithCause: An error occurred while scanning website page: undefined

CodePen repro example

Expected behavior

The extension should create the listed parent directory if it does not already exist.

Screenshots

Context (please complete the following information)

  • OS Name & Version:
  • Azure DevOps Extension Version & Environment:
  • Browser Version:
  • Target Page:

Are you willing to submit a PR?

Yes

Did you search for similar existing issues?

Yes

Additional context

This issue was brought to our attention on 3/27 through the support alias

@JGibson2019 JGibson2019 added the bug Something isn't working label Mar 28, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the status: new This issue is new and requires triage by DRI. label Mar 28, 2023
@JGibson2019 JGibson2019 added status: ready for work This issue is ready to be worked on. and removed status: new This issue is new and requires triage by DRI. labels Mar 28, 2023
@dbjorge dbjorge added the status: active This issue is currently being worked on by someone. label Apr 25, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot removed the status: ready for work This issue is ready to be worked on. label Apr 25, 2023
@dbjorge dbjorge assigned dbjorge and unassigned JGibson2019 Apr 25, 2023
dbjorge added a commit that referenced this issue Apr 27, 2023
…ory (#1647)

#### Details

This PR adds a `{ recursive: true }` option to the point where we create
the `outputDir`, such that it will no longer be an error to specify an
outputDir with an ancestor that doesn't exist yet.

##### Motivation

Addresses #1609 

##### Context

n/a

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [x] Addresses an existing issue: Fixes #1609
- [x] Added relevant unit test for your changes. (`yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [x] Ran precheckin (`yarn precheckin`)
@dbjorge dbjorge added status: resolved This issue has been merged into main and deployed to canary. and removed status: active This issue is currently being worked on by someone. labels Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status: resolved This issue has been merged into main and deployed to canary.
Projects
None yet
2 participants