From c53405f47f594f51ebc71a462619cafe759ad3b6 Mon Sep 17 00:00:00 2001 From: Han Yeong-woo Date: Tue, 11 Jun 2024 10:26:20 +0900 Subject: [PATCH] Support leading `v` in `.node-version` --- nodeenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodeenv.py b/nodeenv.py index e3aaffd..2118186 100644 --- a/nodeenv.py +++ b/nodeenv.py @@ -138,7 +138,7 @@ def _load(cls, configfiles, verbose=False): if os.path.exists(".node-version"): with open(".node-version", "r") as v_file: - setattr(cls, "node", v_file.readlines(1)[0].strip()) + setattr(cls, "node", v_file.readline().strip().lstrip("v")) @classmethod def _dump(cls):