freedomofpress / dangerzone

Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs
https://dangerzone.rocks/
GNU Affero General Public License v3.0
3.35k stars 152 forks source link

Quote command in installation instructions #806

Closed apyrgio closed 1 month ago

apyrgio commented 1 month ago

Zsh users that attempt to run the following command in our Ubuntu/Debian installation instructions:

echo deb [signed-by=/etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg] \
    https://packages.freedom.press/apt-tools-prod ${VERSION_CODENAME?} main \
        | sudo tee /etc/apt/sources.list.d/fpf-apt-tools.list

encounter the following error:

zsh: no matches found:
[signed-by=/etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg]

Quote this command to ensure compatibility with other shells, and update our CI checks.

Fixes #805

sunflowerno0b commented 1 month ago

you'll have to forgive my naïveté, but I am still getting an error when wrapping around quotes :/

ca-certificates is already the newest version (20230311).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
gpg: keybox './fpf-apt-tools-archive-keyring.gpg' created
gpg: key A7C9B38522604281: public key "Dangerzone Release Key <dangerzone-release-key@freedom.press>" imported
gpg: Total number processed: 1
gpg:               imported: 1

 [~]
 sfn  " . /etc/os-release                                                    
echo deb [signed-by=/etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg] \
    https://packages.freedom.press/apt-tools-prod ${VERSION_CODENAME?} main \
    | sudo tee /etc/apt/sources.list.d/fpf-apt-tools.list "
zsh: VERSION_CODENAME: parameter not set

 [~]
 ✘  sfn  ". /etc/os-release 
echo deb [signed-by=/etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg] \
    https://packages.freedom.press/apt-tools-prod ${VERSION_CODENAME?} main \
    | sudo tee /etc/apt/sources.list.d/fpf-apt-tools.list" 
zsh: VERSION_CODENAME: parameter not set

 [~]
 ✘  sfn  ". /etc/os-release
echo deb [signed-by=/etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg] \
    https://packages.freedom.press/apt-tools-prod ${bookworm} main \  
    | sudo tee /etc/apt/sources.list.d/fpf-apt-tools.list"
zsh: no such file or directory: . /etc/os-release\necho deb [signed-by=/etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg]     https://packages.freedom.press/apt-tools-prod  main     | sudo tee /etc/apt/sources.list.d/fpf-apt-tools.list

Adding here for other noobs, creating a .sh file containing the command above and executing with bash does work!

apyrgio commented 1 month ago

I am still getting an error when wrapping around quotes :/

Right, that's because you have wrapped the whole command in quotes. The suggested change in this PR is to wrap a smaller portion of the command:

https://github.com/freedomofpress/dangerzone/blob/861542386d979fcdd5183e15fbf2fd26e72cfb62/INSTALL.md?plain=1#L96-L99

sunflowerno0b commented 1 month ago

thank you so much! i really appreciate it 💖---A.Le 15 mai 2024 à 10:46, Alex Pyrgiotis @.***> a écrit :

I am still getting an error when wrapping around quotes :/

Right, that's because you have wrapped the whole command in quotes. The suggested change in this PR is to wrap a smaller portion of the command: https://github.com/freedomofpress/dangerzone/blob/861542386d979fcdd5183e15fbf2fd26e72cfb62/INSTALL.md?plain=1#L96-L99

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>