Skip to content

Commit

Permalink
fix: safety check for undefined curr cloud backend path (#8584)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfoyle authored Oct 27, 2021
1 parent c3eb68b commit f72e59b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export type ProjectOptions<T> = {
transformersFactory: (options: T) => Promise<TransformerPluginProvider[]>;
transformersFactoryArgs: T;
rootStackFileName: 'cloudformation-template.json';
currentCloudBackendDirectory: string;
currentCloudBackendDirectory?: string;
minify: boolean;
lastDeployedProjectConfig?: TransformerProjectConfig;
projectConfig: TransformerProjectConfig;
Expand All @@ -472,7 +472,7 @@ export async function buildAPIProject(opts: ProjectOptions<TransformerFactoryArg
const builtProject = await _buildProject(opts);

const buildLocation = path.join(opts.projectDirectory, 'build');
const currCloudLocation = path.join(opts.currentCloudBackendDirectory, 'build');
const currCloudLocation = opts.currentCloudBackendDirectory ? path.join(opts.currentCloudBackendDirectory, 'build') : undefined;

if (opts.projectDirectory && !opts.dryRun) {
await writeDeploymentToDisk(builtProject, buildLocation, opts.rootStackFileName, opts.buildParameters, opts.minify);
Expand Down

0 comments on commit f72e59b

Please sign in to comment.