From 8487fcadc190afef2a04e83eb1d0267c2940d1a2 Mon Sep 17 00:00:00 2001 From: Giacomo Marciani Date: Mon, 6 May 2024 13:27:07 +0200 Subject: [PATCH] Check processes using a given path only if the path exists. Signed-off-by: Giacomo Marciani --- .../aws-parallelcluster-environment/resources/file_utils.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/aws-parallelcluster-environment/resources/file_utils.rb b/cookbooks/aws-parallelcluster-environment/resources/file_utils.rb index 10c7c70c9c..b18d675645 100644 --- a/cookbooks/aws-parallelcluster-environment/resources/file_utils.rb +++ b/cookbooks/aws-parallelcluster-environment/resources/file_utils.rb @@ -24,5 +24,6 @@ timeout 10 live_stream true command "fuser -mv #{file}" + only_if { File.file?(file) || File.directory?(file) } end end