Skip to content

Feature request: Check before deleting files in output folder #1913

@sergzin

Description

@sergzin

Description

I am new to ucc, and found certain options / default behavior a bit confusing.
While building an app I accidentally erased my local git repo.
Perhaps it would be good idea to add some checks before deleting files in output folder.

here is what I did

  1. initiated an addon - ucc-gen init --addon-name "demo_addon_for_splunk" --addon-display-name "Demo Add-on for Splunk" --addon-input-name demo_input

  2. initiated git repo and added all generated files with git commit

  3. in the root folder I have the following files.
    .git
    .venv
    demo_addon_for_splunk

  4. ucc build default options for source and config by default will look in the current folder

  5. I changed folder to cd demo_addon_for_splunk
    List of files in current folder:
    README.md
    globalConfig.json
    package

  6. I thought I dont want to create output in the the same folder, output/ should be created in the parent folder.

  7. I run command ucc-gen build -o ../ which erased all files in parent folder without warning

OK, lesson learned.

However, I think ucc should do some basic checks to warn user that he is about to delete some important files. For example checking that .git or .venv folders are present.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions