Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

When installing modules with licenses, dmf-get now displays the license and prompts for acceptance before proceeding, similar to apt-get behavior.

Changes

  • License detection and display: Extracts license from .dmr resource file (key: "license"), displays in formatted box
  • Interactive prompt: [y/N] prompt blocks installation unless explicitly accepted with 'y' or 'Y'
  • Non-interactive flag: -y / --yes auto-accepts all licenses for CI/CD and automation
  • Backward compatibility: Modules without licenses install without prompts

Implementation

Added to ExtractZipAndFindModule before resource processing:

// Check license acceptance before proceeding
if (!CheckLicenseAcceptance(extract_dir, module_name, output_dir, auto_accept_license)) {
    DMOD_LOG_INFO("Installation cancelled by user\n");
    // Clean up and return false
}

Output example:

================================================================================
LICENSE
================================================================================
MIT License
...
================================================================================

Do you accept the license terms? [y/N]:

Usage: dmf-get -y mymodule skips prompt entirely.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Dodać potrzebę zaakceptowania licencji (jeśli dostępna) w dmf-get</issue_title>
<issue_description>Jeśli dmf-get znajdzie licencję modułu, to przed instalacją powinien ją pokazać użytkownikowi i poprosić o potwierdzenie za pomocą [y/N] (tak jak robi to apt-get), chyba że użytkownik poda parametr -y, który od razu akceptuje licencje i działa w trybie noninteractive</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 11, 2025 07:07
Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot AI changed the title [WIP] Add license acceptance requirement in dmf-get Add license acceptance prompt to dmf-get with -y flag for non-interactive mode Dec 11, 2025
Copilot AI requested a review from JohnAmadis December 11, 2025 07:14
@JohnAmadis JohnAmadis marked this pull request as ready for review December 11, 2025 07:27
@JohnAmadis JohnAmadis merged commit dc59d75 into develop Dec 11, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dodać potrzebę zaakceptowania licencji (jeśli dostępna) w dmf-get

2 participants