From 9e96a5c8c8043ce8cdd21461712a8a9c18670d73 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Tue, 13 Oct 2020 20:46:56 +0100 Subject: [PATCH] fix(core): only install vscode extension if its not already installed When installing a vscode extention the shell command to install the extention would run every time puppet was run. Now we test to see if the extention is installed first before trying to install it. --- site-modules/vscode/manifests/extention.pp | 1 + 1 file changed, 1 insertion(+) diff --git a/site-modules/vscode/manifests/extention.pp b/site-modules/vscode/manifests/extention.pp index 82733b8..3bc878e 100644 --- a/site-modules/vscode/manifests/extention.pp +++ b/site-modules/vscode/manifests/extention.pp @@ -2,6 +2,7 @@ define vscode::extention { exec { "code_install_${title}": command => "code --install-extension ${title}", path => '/usr/bin:/usr/local/bin:/usr/sbin:/bin', + unless => "code --list-extensions | grep ${title}", provider => shell, } }