Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: safety check for undefined curr cloud backend path #8584

Merged
merged 1 commit into from
Oct 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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