File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- - Upgraded ` inquirer ` library to address some visual bugs with prompting ( # 8389 )
1+ - Fixed an issue where the prompt to create apphosting.emulator.yaml did not work with backends that are not at the project.root ( # 8412 )
Original file line number Diff line number Diff line change @@ -218,11 +218,11 @@ export async function maybeAddSecretToYaml(
218218 */
219219export async function maybeGenerateEmulatorYaml (
220220 projectId : string | undefined ,
221- repoRoot : string ,
221+ backendRoot : string ,
222222) : Promise < Env [ ] | null > {
223223 // Even if the app is in /project/app, the user might have their apphosting.yaml file in /project/apphosting.yaml.
224224 // Walk up the tree to see if we find other local files so that we can put apphosting.emulator.yaml in the right place.
225- const basePath = dynamicDispatch . discoverBackendRoot ( repoRoot ) || repoRoot ;
225+ const basePath = dynamicDispatch . discoverBackendRoot ( backendRoot ) || backendRoot ;
226226 if ( fs . fileExistsSync ( join ( basePath , APPHOSTING_EMULATORS_YAML_FILE ) ) ) {
227227 logger . debug (
228228 "apphosting.emulator.yaml already exists, skipping generation and secrets access prompt" ,
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { detectStartCommand } from "./apphosting/developmentServer";
77import { EmulatorLogger } from "./emulatorLogger" ;
88import { Emulators } from "./types" ;
99import { Env , maybeGenerateEmulatorYaml } from "../apphosting/config" ;
10- import { detectProjectRoot } from "../detectProjectRoot" ;
1110import { Config } from "../config" ;
1211import { getProjectId } from "../projectUtils" ;
1312import { grantEmailsSecretAccess } from "../apphosting/secrets" ;
@@ -42,8 +41,7 @@ export const AdditionalInitFns: AdditionalInitFnsType = {
4241 const projectId = getProjectId ( config . options ) ;
4342 let env : Env [ ] | null = [ ] ;
4443 try {
45- const projectRoot = detectProjectRoot ( { cwd : config . options . cwd } ) ?? backendRoot ;
46- env = await maybeGenerateEmulatorYaml ( projectId , projectRoot ) ;
44+ env = await maybeGenerateEmulatorYaml ( projectId , backendRoot ) ;
4745 } catch ( e ) {
4846 logger . log ( "WARN" , "failed to export app hosting configs" ) ;
4947 }
You can’t perform that action at this time.
0 commit comments