The nuxthub deploy command includes the --dotenv flag, but this flag is ignored during the linkedProject phase. Upon inspecting the code at this line and the fetchProject() function at this line, it is evident that the --dotenv flag is not taken into account. Instead, the fetchProject function utilizes process.env.
Currently, the --dotenv flag is only considered during the build phase.
This logic becomes cumbersome when managing three different environments:
Local
Preview
Production
Ideally, each command should consider the --dotenv flag to facilitate smoother environment management.
Steps to Reproduce
Use the nuxthub deploy command with the --dotenv flag.
Observe that the environment variables specified in the dotenv file are not applied during the linkedProject phase. No project is linked with the NUXT_HUB_PROJECT_KEY environment variable.
Expected Behavior
The --dotenv flag should be considered during all phases of the nuxthub deploy command, including the linkedProject phase.
Actual Behavior
The --dotenv flag is ignored during the linkedProject phase, and only considered during the build phase.
Description
The
nuxthub deploy
command includes the--dotenv
flag, but this flag is ignored during thelinkedProject
phase. Upon inspecting the code at this line and thefetchProject()
function at this line, it is evident that the--dotenv
flag is not taken into account. Instead, thefetchProject
function utilizesprocess.env
.Currently, the
--dotenv
flag is only considered during the build phase.This logic becomes cumbersome when managing three different environments:
Ideally, each command should consider the
--dotenv
flag to facilitate smoother environment management.Steps to Reproduce
nuxthub deploy
command with the--dotenv
flag.linkedProject
phase.No project is linked with the NUXT_HUB_PROJECT_KEY environment variable.
Expected Behavior
The
--dotenv
flag should be considered during all phases of thenuxthub deploy
command, including thelinkedProject
phase.Actual Behavior
The
--dotenv
flag is ignored during thelinkedProject
phase, and only considered during the build phase.