-
Notifications
You must be signed in to change notification settings - Fork 23
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(util): correct logging for synth #1634
Changes from all commits
6188c90
881515d
7f94c2f
530deab
c0f1fc4
c2fb72f
ec2cc28
b9fa399
9e3188c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,9 +44,14 @@ export async function mkdtemp(closure: (dir: string) => Promise<void>) { | |
} | ||
|
||
export async function synthApp(command: string, outdir: string, stdout: boolean, metadata: boolean): Promise<SynthesizedApp> { | ||
if (!await fs.pathExists(outdir)) { | ||
console.log('WARNING: specified outdir does not exist, synth command could fail') | ||
} | ||
|
||
if (!stdout) { | ||
console.log('Synthesizing application'); | ||
} | ||
|
||
await shell(command, [], { | ||
shell: true, | ||
env: { | ||
|
@@ -58,11 +63,6 @@ export async function synthApp(command: string, outdir: string, stdout: boolean, | |
}, | ||
}); | ||
|
||
if (!await fs.pathExists(outdir)) { | ||
console.error(`ERROR: synthesis failed, app expected to create "${outdir}"`); | ||
process.exit(1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand where your coming from with having Note that if you do it the other way around, i.e set |
||
} | ||
|
||
let found = false; | ||
const yamlFiles = await findManifests(outdir); | ||
if (yamlFiles?.length) { | ||
|
@@ -76,6 +76,8 @@ export async function synthApp(command: string, outdir: string, stdout: boolean, | |
|
||
if (!found) { | ||
console.error('No manifests synthesized'); | ||
} else { | ||
console.log('Manifests synthesized!') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this necessary though. If we found manifests, then we print their path already, indicating a successful synthesis. |
||
} | ||
|
||
const constructMetadata = findConstructMetadata(outdir); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting this here means that this warning will always be printed because the outdir is expected to be created further down (in the
await shell
call).