From 32ae1acccea6bc8b4e74e8c7997d8c747ab75017 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 3 Nov 2021 17:25:51 -0700 Subject: [PATCH] Oops, fix testing for node_modules I somehow had it in my head that `realpath` would crash if the file didn't exist, but that's super not true! It returns the tentative path for if you _were_ gonna create this! --- deploy/playbooks/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/playbooks/deploy.yml b/deploy/playbooks/deploy.yml index f28cef1..37ac436 100644 --- a/deploy/playbooks/deploy.yml +++ b/deploy/playbooks/deploy.yml @@ -59,7 +59,7 @@ command: | bash -c " cmp '{{ remote_app_root }}/yarn.lock' '/srv/impress-2020/current/yarn.lock' && - realpath /srv/impress-2020/current/node_modules" + test -e /srv/impress-2020/current/node_modules" failed_when: no register: can_reuse_node_modules_when_successful