diff --git a/ocdeployer/env.py b/ocdeployer/env.py
index 7ef3e7a..c644e9a 100644
--- a/ocdeployer/env.py
+++ b/ocdeployer/env.py
@@ -277,15 +277,12 @@ class LegacyEnvConfigHandler(EnvConfigHandler):
     def _get_env_name(file_path):
         return os.path.splitext(os.path.basename(file_path))[0]
 
-    def __init__(self, env_files):
+    def __init__(self, env_files, env_dir_name="env"):
         self.env_files = env_files
-        self._last_service_set = None
         _env_names = [self._get_env_name(fp) for fp in self.env_files]
-        self.env_names = _dedupe_preserve_order(_env_names)
-        if len(_env_names) != len(self.env_names):
-            log.warning("Duplicate env names provided: %s", _env_names)
+        super().__init__(_env_names, env_dir_name)
 
-    def _load_vars_per_env(self):
+    def _load_vars_per_env(self, path=None):
         data = {}
 
         for file_path in self.env_files:

AttributeError: 'LegacyEnvConfigHandler' object has no attribute 'env_dir_name'
ocdeployer deploy -f --sets vmaas --template-dir buildfactory -e builder-env.yml vmaas-qe --secrets-local-dir secrets/sanitized

```
INFO:ocdeployer.deploy:Handling config for service set 'vmaas'

Traceback (most recent call last):

  File "/iqe_venv/bin/ocdeployer", line 8, in <module>

    sys.exit(main())

  File "/iqe_venv/lib64/python3.6/site-packages/click/core.py", line 764, in __call__

    return self.main(*args, **kwargs)

  File "/iqe_venv/lib64/python3.6/site-packages/click/core.py", line 717, in main

    rv = self.invoke(ctx)

  File "/iqe_venv/lib64/python3.6/site-packages/click/core.py", line 1137, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/iqe_venv/lib64/python3.6/site-packages/click/core.py", line 956, in invoke

    return ctx.invoke(self.callback, **ctx.params)

  File "/iqe_venv/lib64/python3.6/site-packages/click/core.py", line 555, in invoke

    return callback(*args, **kwargs)

  File "/iqe_venv/lib64/python3.6/site-packages/ocdeployer/__main__.py", line 375, in deploy_to_project

    dry_run=False,

  File "/iqe_venv/lib64/python3.6/site-packages/ocdeployer/deploy.py", line 523, in run

    all_processed_templates[service_set] = self._deploy_service_set(service_set)

  File "/iqe_venv/lib64/python3.6/site-packages/ocdeployer/deploy.py", line 430, in _deploy_service_set

    set_cfg = self._get_service_set_cfg(service_set, dir_path)

  File "/iqe_venv/lib64/python3.6/site-packages/ocdeployer/deploy.py", line 421, in _get_service_set_cfg

    set_env_cfg = self.env_config_handler.get_service_set_env_cfg(dir_path, service_set)

  File "/iqe_venv/lib64/python3.6/site-packages/ocdeployer/env.py", line 190, in get_service_set_env_cfg

    self._get_service_set_vars(service_set_dir, service_set), service_set=service_set

  File "/iqe_venv/lib64/python3.6/site-packages/ocdeployer/env.py", line 139, in _get_service_set_vars

    path = os.path.join(service_set_dir, self.env_dir_name)

AttributeError: 'LegacyEnvConfigHandler' object has no attribute 'env_dir_name'
```
diff --git a/tests/test_deploy.py b/tests/test_deploy.py
index ae53a1e..fcff4f4 100644
--- a/tests/test_deploy.py
+++ b/tests/test_deploy.py
@@ -10,7 +10,7 @@ def patched_runner(env_values, mock_load_vars_per_env, legacy=False):
     if not env_values:
         handler = None
     elif legacy:
-        handler = LegacyEnvConfigHandler(env_files=env_values)
+        handler = LegacyEnvConfigHandler(env_files=env_values, env_dir_name="envTEST")
         handler.env_names = env_values
     else:
         handler = EnvConfigHandler(env_names=env_values, env_dir_name="envTEST")

pip install -e .
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
appdirs==1.4.4
cached-property==1.5.2
cachetools==5.5.2
certifi @ file:///croot/certifi_1671487769961/work/certifi
charset-normalizer==3.4.1
click==8.1.8
durationpy==0.9
exceptiongroup==1.2.2
google-auth==2.38.0
idna==3.10
importlib-metadata==6.7.0
iniconfig==2.0.0
Jinja2==3.1.6
kubernetes==32.0.1
MarkupSafe==2.1.5
oauthlib==3.2.2
-e git+https://github.com/bsquizz/ocdeployer.git@c121a6ac9286389fb33a67190e7ecfbb9544e5ce#egg=ocdeployer
packaging==24.0
parsedatetime==2.6
pluggy==1.2.0
prompter==0.3.10
pyasn1==0.5.1
pyasn1-modules==0.3.0
pytest==7.4.4
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
requests==2.31.0
requests-oauthlib==2.0.0
rsa==4.9
sh==1.14.3
six==1.17.0
tomli==2.0.1
typing_extensions==4.7.1
urllib3==2.0.7
wait-for==1.2.0
websocket-client==1.6.1
zipp==3.15.0

name: ocdeployer
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - appdirs==1.4.4
      - cached-property==1.5.2
      - cachetools==5.5.2
      - charset-normalizer==3.4.1
      - click==8.1.8
      - durationpy==0.9
      - exceptiongroup==1.2.2
      - google-auth==2.38.0
      - idna==3.10
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - jinja2==3.1.6
      - kubernetes==32.0.1
      - markupsafe==2.1.5
      - oauthlib==3.2.2
      - packaging==24.0
      - parsedatetime==2.6
      - pluggy==1.2.0
      - prompter==0.3.10
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pytest==7.4.4
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - requests==2.31.0
      - requests-oauthlib==2.0.0
      - rsa==4.9
      - sh==1.14.3
      - six==1.17.0
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - wait-for==1.2.0
      - websocket-client==1.6.1
      - zipp==3.15.0
prefix: /opt/conda/envs/ocdeployer

tests/test_deploy.py::test__get_variables_sanity[legacy=true] tests/test_deploy.py::test__get_variables_merge_from_global[legacy=true] tests/test_deploy.py::test__get_variables_service_overwrite_parameter[legacy=true] tests/test_deploy.py::test__get_variables_service_overwrite_variable[legacy=true] tests/test_deploy.py::test__get_variables_component_overwrite_parameter[legacy=true] tests/test_deploy.py::test__get_variables_component_overwrite_variable[legacy=true] tests/test_deploy.py::test__get_variables_multiple_envs_legacy
tests/test_deploy.py::test_cfg_no_env_given tests/test_deploy.py::test_cfg_no_env_cfg tests/test_deploy.py::test_cfg_base_env_cfg tests/test_deploy.py::test_cfg_set_env_cfg tests/test_deploy.py::test__no_env_given tests/test_deploy.py::test__get_variables_sanity[legacy=false] tests/test_deploy.py::test__get_variables_merge_from_global[legacy=false] tests/test_deploy.py::test__get_variables_service_overwrite_parameter[legacy=false] tests/test_deploy.py::test__get_variables_service_overwrite_variable[legacy=false] tests/test_deploy.py::test__get_variables_component_overwrite_parameter[legacy=false] tests/test_deploy.py::test__get_variables_component_overwrite_variable[legacy=false] tests/test_deploy.py::test__get_variables_base_and_service_set tests/test_deploy.py::test__get_variables_service_set_only tests/test_deploy.py::test__get_variables_service_set_overrides tests/test_deploy.py::test__get_variables_multiple_envs tests/test_deploy.py::test__get_variables_multiple_envs_precedence tests/test_deploy.py::test__get_variables_multiple_envs_precedence_reversed
ocdeployer/env.py
ocdeployer/env.py