2

When trying to install flapaks in a script,

$ flatpak install program_I_am_installing

I get prompted with

Found similar ref(s) for 'program_I_am_installing' in remote 'flathub' (subsystem).

Use this remote [Y/n]:

The default goes to "n" when running the script since I have no way of entering Y withing the script.

I tried giving flatpak the full Application ID, but that didn't stop the question from being asked.

I'd either like to find how to answer the question Y in the script or know how to more specificaly state the program name so this question isn't asked.

2

There are multiple option that may help get silent installation

  • Include REMOTE source explicitly

    flatpak install [OPTION...] [REMOTE] REF
    flatpak install flathub <your-program>
    
  • Assume YES like with apt-get or Non-Interactive

    -y, --assumeyes

    Automatically answer yes to all questions (or pick the most prioritized answer). This is useful for automation.

    --noninteractive

    Produce minimal output and avoid most questions. This is suitable for use in non-interactive situations, e.g. in a build script.

    flatpak install -y --noninteractive <your-program>
    

Reference: flatpak docs

| improve this answer | |
  • 1
    This fixed all of them except one that looks like it didn't have a default defined or possible the name I gave wasn't unique enough. – rkeating Oct 13 '19 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.