Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit 9f8991a

Browse files
authored
Fix 954- infra generate (#256)
1 parent edaf8d6 commit 9f8991a

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/commands/infra/generate.test.ts

-7
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ describe("test generateTfvars function", () => {
123123
})
124124
).toEqual(['hello = "world"']);
125125
});
126-
it("one value with quote as data", () => {
127-
expect(
128-
generateTfvars({
129-
hello: '"world'
130-
})
131-
).toEqual(['hello = "\\"world"']);
132-
});
133126
it("one key with quote as data", () => {
134127
expect(
135128
generateTfvars({

src/commands/infra/generate.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ export const validateRemoteSource = async (
254254
await gitClone(source, sourcePath);
255255
}
256256
// Checkout tagged version
257-
logger.info(`Checking out template version: ${version}`);
258257
await gitCheckout(sourcePath, version);
259258
} catch (err) {
260259
logger.error(err);
@@ -545,9 +544,7 @@ export const generateTfvars = (
545544
if (!definition) {
546545
return [];
547546
}
548-
return Object.keys(definition).map(
549-
k => `${k} = "${definition[k].replace(/"/g, '\\"')}"`
550-
);
547+
return Object.keys(definition).map(k => `${k} = "${definition[k]}"`);
551548
};
552549

553550
/**

0 commit comments

Comments
 (0)