From 070c9a897433e5dd50580aca63386e3bf58508b8 Mon Sep 17 00:00:00 2001 From: Moritz Raho Date: Sun, 16 Apr 2023 15:49:39 +0200 Subject: [PATCH] src: fix typo in process.env accessor error message PR-URL: https://github.com/nodejs/node/pull/47014 Reviewed-By: Colin Ihrig Reviewed-By: Yagiz Nizipli Reviewed-By: Anna Henningsen Reviewed-By: Darshan Sen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- src/node_env_var.cc | 4 ++-- test/parallel/test-process-env-ignore-getter-setter.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_env_var.cc b/src/node_env_var.cc index 990a2a40717216..94936ea1c2bd22 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc @@ -444,8 +444,8 @@ static void EnvDefiner(Local property, } else if (desc.has_get() || desc.has_set()) { // we don't accept a getter/setter in 'process.env' THROW_ERR_INVALID_OBJECT_DEFINE_PROPERTY(env, - "'process.env' does not accept an" - "accessor(getter/setter)" + "'process.env' does not accept an" + " accessor(getter/setter)" " descriptor"); } else { THROW_ERR_INVALID_OBJECT_DEFINE_PROPERTY(env, diff --git a/test/parallel/test-process-env-ignore-getter-setter.js b/test/parallel/test-process-env-ignore-getter-setter.js index 7368eb85684c5a..677960570a0bc1 100644 --- a/test/parallel/test-process-env-ignore-getter-setter.js +++ b/test/parallel/test-process-env-ignore-getter-setter.js @@ -33,7 +33,7 @@ assert.throws( { code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY', name: 'TypeError', - message: '\'process.env\' does not accept an' + + message: '\'process.env\' does not accept an ' + 'accessor(getter/setter) descriptor' } );