Skip to content

Commit

Permalink
chore: fix eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed Feb 15, 2022
1 parent 4e1a339 commit 2f64b97
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/cdktf-cli/bin/cmds/ui/synth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const Synth = ({
const project = new CdktfProject({
targetDir,
synthCommand,
onUpdate: () => {},
onUpdate: () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
});

project.synth().then(() => setStacks(project.stacks), setError);
Expand Down
17 changes: 11 additions & 6 deletions packages/cdktf-cli/lib/models/terraform-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class TerraformCli implements Terraform {

constructor(
public readonly stack: SynthesizedStack,
sendLog = (_stdout: string, _isErr = false) => {}
sendLog = (_stdout: string, _isErr = false) => {} // eslint-disable-line @typescript-eslint/no-empty-function
) {
this.workdir = stack.workingDirectory;
this.onStdOut = (stdout: Buffer) => sendLog(stdout.toString());
Expand Down Expand Up @@ -56,12 +56,17 @@ export class TerraformCli implements Terraform {
options.push("-destroy");
}
await this.setUserAgent();
await exec(terraformBinaryName, options, {
cwd: this.workdir,
env: process.env,
}),
await exec(
terraformBinaryName,
options,
{
cwd: this.workdir,
env: process.env,
},
this.onStdOut,
this.onStdErr;
this.onStdErr
);

const jsonPlan = await exec(
terraformBinaryName,
["show", "-json", planFile],
Expand Down
2 changes: 1 addition & 1 deletion packages/cdktf-cli/lib/models/terraform-cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class TerraformCloud implements Terraform {
public readonly config: TerraformJsonConfigBackendRemote,
isSpeculative = false,
// TODO: find out how to forward logs from terraform cloud (only public to ignore ts error)
public readonly sendLog = (_stdout: string, _isErr = false) => {}
public readonly sendLog = (_stdout: string, _isErr = false) => {} // eslint-disable-line @typescript-eslint/no-empty-function
) {
if (!config.workspaces.name)
throw new Error("Please provide a workspace name for Terraform Cloud");
Expand Down

0 comments on commit 2f64b97

Please sign in to comment.