From a9ed9fa89561f40b2fe533ff187d17e61afd3abe Mon Sep 17 00:00:00 2001 From: Jake Chitel Date: Fri, 19 Jan 2018 12:58:16 -0600 Subject: [PATCH] removed extraneous time.Sleep() call --- src/nvm.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nvm.go b/src/nvm.go index 3762bcd..af5e958 100644 --- a/src/nvm.go +++ b/src/nvm.go @@ -280,8 +280,7 @@ func install(version string, cpuarch string) { os.Rename(filepath.Join(tempNpmBin, "npx"), filepath.Join(env.root, "v"+version, "npx")) os.Rename(filepath.Join(tempNpmBin, "npx.cmd"), filepath.Join(env.root, "v"+version, "npx.cmd")) } - - time.Sleep(10000*time.Millisecond) + err := os.Rename(filepath.Join(tempDir, "nvm-npm", "npm-"+npmv), filepath.Join(env.root, "v"+version, "node_modules", "npm")) if err != nil { // sometimes Windows can take some time to enable access to large amounts of files after unzip, use exponential backoff to wait until it is ready -- GitLab