File tree Expand file tree Collapse file tree 5 files changed +17
-8
lines changed
Expand file tree Collapse file tree 5 files changed +17
-8
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 77 getConfigDefaultAccountIfExists ,
88 configFileExists ,
99} from '@hubspot/local-dev-lib/config' ;
10+ import { ENVIRONMENT_VARIABLES } from '@hubspot/local-dev-lib/constants/config' ;
1011import { getCwd } from '@hubspot/local-dev-lib/path' ;
1112import { validateAccount } from '../validation.js' ;
1213import { EXIT_CODES } from '../enums/exitCodes.js' ;
@@ -43,7 +44,7 @@ export function handleCustomConfigLocationMiddleware(
4344) : void {
4445 const { useEnv, config } = argv ;
4546 if ( useEnv ) {
46- process . env . USE_ENVIRONMENT_HUBSPOT_CONFIG = 'true' ;
47+ process . env [ ENVIRONMENT_VARIABLES . USE_ENVIRONMENT_HUBSPOT_CONFIG ] = 'true' ;
4748 } else if ( config && typeof config === 'string' ) {
4849 const absoluteConfigPath = path . isAbsolute ( config )
4950 ? config
@@ -105,7 +106,10 @@ export async function validateConfigMiddleware(
105106
106107 // We don't run validation for auth because users should be able to run it when
107108 // no accounts are configured, but we still want to exit if the config file is not found
108- if ( ! process . env . USE_ENVIRONMENT_HUBSPOT_CONFIG && ! configFileExists ( ) ) {
109+ if (
110+ ! process . env [ ENVIRONMENT_VARIABLES . USE_ENVIRONMENT_HUBSPOT_CONFIG ] &&
111+ ! configFileExists ( )
112+ ) {
109113 console . error (
110114 'Config file not found, run hs account auth to configure your account'
111115 ) ;
Original file line number Diff line number Diff line change @@ -3,11 +3,16 @@ import {
33 getConfigFilePath ,
44 globalConfigFileExists ,
55} from '@hubspot/local-dev-lib/config' ;
6+ import { ENVIRONMENT_VARIABLES } from '@hubspot/local-dev-lib/constants/config' ;
67import { checkAndWarnGitInclusion } from '../ui/git.js' ;
78import { debugError } from '../errorHandlers/index.js' ;
9+
810export function checkAndWarnGitInclusionMiddleware ( argv : Arguments ) : void {
9- // Skip this when no command is provided
10- if ( argv . _ . length ) {
11+ // Skip this when no command is provided or if using environment config
12+ if (
13+ argv . _ . length &&
14+ ! process . env [ ENVIRONMENT_VARIABLES . USE_ENVIRONMENT_HUBSPOT_CONFIG ]
15+ ) {
1116 // Skip if using global config
1217 if ( globalConfigFileExists ( ) ) {
1318 return ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @hubspot/cli" ,
3- "version" : " 7.11.1 " ,
3+ "version" : " 7.11.2 " ,
44 "description" : " The official CLI for developing on HubSpot" ,
55 "license" : " Apache-2.0" ,
66 "repository" : " https://github.com/HubSpot/hubspot-cli" ,
77 "type" : " module" ,
88 "dependencies" : {
9- "@hubspot/local-dev-lib" : " 4.0.3 " ,
9+ "@hubspot/local-dev-lib" : " 4.0.4 " ,
1010 "@hubspot/project-parsing-lib" : " 0.10.2" ,
1111 "@hubspot/serverless-dev-runtime" : " 7.0.7" ,
1212 "@hubspot/theme-preview-dev-server" : " 0.0.12" ,
111111 "node" : " >=18"
112112 },
113113 "bin" : {
114- "hs" : " ./bin/hs" ,
115- "hscms" : " ./bin/hscms"
114+ "hs" : " ./bin/hs.js " ,
115+ "hscms" : " ./bin/hscms.js "
116116 },
117117 "publishConfig" : {
118118 "access" : " public" ,
You can’t perform that action at this time.
0 commit comments