Capgemini / powerapps-project-template

A Yeoman generator for scaffolding Power Apps projects based on our tooling and best practices.
MIT License
20 stars 6 forks source link

Rollback of repo fails when repo was never initialised #57

Closed tdashworth closed 2 years ago

tdashworth commented 3 years ago

Describe the bug

If an issue arises during the AzureDevOps sub-generator before the repo is initialised, the rollback of the repo fails before it expects the repo to exist.

To reproduce

In this scenario, the auth token did not have the correct permissions which failed the creation of variable groups.

Expected behaviour

Rollback to be successful, skipping the deletion of ./.git folder.

Screenshots

Setting up Azure DevOps...
Generating variable groups...
Creating CI Environment - Core variable group...
Creating Integration Tests - Core variable group...
Package generator encountered an error.
Rolling back all generated objects in Orion...
Rolling back 0 repositories...
Rolling back 0 build definitions...
Rolling back 0 releases definitions...
Rolling back 0 variable groups...
Rolling back 0 extensions...
Rolling back 0 service connections...
(node:23436) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
Error @capgeminiuk/powerapps-project:azuredevops
ENOENT: no such file or directory, stat 'C:\.git'

Environment (please complete the following information):

tdashworth commented 3 years ago

This seems to be a node v17 issue.