From 50cef2e6ae042542fbe277f9d221b6c999b5a348 Mon Sep 17 00:00:00 2001 From: Andreas Opferkuch Date: Mon, 21 May 2018 18:33:17 +0200 Subject: [PATCH] Fixes #252 - Need to manually remove folder on nvm uninstall File handle when checking the architecture of the node executable was left open. --- src/nvm/arch/arch.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nvm/arch/arch.go b/src/nvm/arch/arch.go index b7a7f64..2738c18 100644 --- a/src/nvm/arch/arch.go +++ b/src/nvm/arch/arch.go @@ -34,10 +34,12 @@ func SearchBytesInFile( path string, match string, limit int) bool { if bit[0] == toMatch[j] { j++; if (j >= len(toMatch)) { + file.Close(); return true; } } } + file.Close(); return false; } -- GitLab