From 2fd3da94c74a70bab482326319d3c06582d064c7 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Aillet Date: Sat, 11 Jun 2022 16:04:10 +0200 Subject: [PATCH] Fix a wrong usage of sudo in debian install doc Currently `sudo` is applied to `echo` resulting in: `/etc/apt/sources.list.d/terraform.list: Permission denied` Using `echo "..." | sudo tee /etc/apt/sources.list.d/terraform.list` fix the problem --- website/docs/cli/install/apt.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cli/install/apt.mdx b/website/docs/cli/install/apt.mdx index 6cc79c73cf..efe7d77604 100644 --- a/website/docs/cli/install/apt.mdx +++ b/website/docs/cli/install/apt.mdx @@ -39,7 +39,7 @@ After registering the key, you can add the official HashiCorp repository to your system: ```bash -sudo echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/terraform-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/terraform.list +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/terraform-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/terraform.list ``` The above command line uses the following sub-shell commands: