Skip to content

[sda-cli] Exiting of cli command should be managed by the the main func #589

@KarlG-nbis

Description

@KarlG-nbis

Please describe the feature

As a developer, I want the exiting of the cli command to only happen in the main function so that the control of the exiting of the commands is centralised and managed by the main function. This improves clarity and the ability to test the cli commands.

Acceptance criteria

  • Exiting of cli command should be managed by the the main func
  • Existing behaviour of cli command is retained
  • Tests
    • Unit tests
    • Testing the encrypt scenario especially if the encrypt command skips files.

Additional context

Main culprit: https://github.com/NBISweden/sda-cli/blob/main/encrypt/encrypt.go#L146

Given that the code exits at this point we can not easily add unit tests testing this behaviour.

Estimation of size: medium

Estimation of priority: low

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions